aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/ValueTypes.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-07-01 13:22:02 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-07-01 13:22:02 +0000
commit9df3605dea17e84f8183581f6103bd0c79e2a606 (patch)
tree70a2f36ce9eb9bb213603cd7f2f120af53fc176f /include/llvm/CodeGen/ValueTypes.h
parent08bbd35a80bf7765fe0d3043f9eb5a2f2786b649 (diff)
downloadsrc-9df3605dea17e84f8183581f6103bd0c79e2a606.tar.gz
src-9df3605dea17e84f8183581f6103bd0c79e2a606.zip
Vendor import of llvm trunk r306956:vendor/llvm/llvm-trunk-r306956
Notes
Notes: svn path=/vendor/llvm/dist/; revision=320533 svn path=/vendor/llvm/llvm-trunk-r306956/; revision=320534; tag=vendor/llvm/llvm-trunk-r306956
Diffstat (limited to 'include/llvm/CodeGen/ValueTypes.h')
-rw-r--r--include/llvm/CodeGen/ValueTypes.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/include/llvm/CodeGen/ValueTypes.h b/include/llvm/CodeGen/ValueTypes.h
index b404b4ca701f..40d501edde10 100644
--- a/include/llvm/CodeGen/ValueTypes.h
+++ b/include/llvm/CodeGen/ValueTypes.h
@@ -17,7 +17,10 @@
#define LLVM_CODEGEN_VALUETYPES_H
#include "llvm/CodeGen/MachineValueType.h"
+#include "llvm/Support/Compiler.h"
+#include "llvm/Support/MathExtras.h"
#include <cassert>
+#include <cstdint>
#include <string>
namespace llvm {
@@ -30,13 +33,13 @@ namespace llvm {
/// can represent.
struct EVT {
private:
- MVT V;
- Type *LLVMTy;
+ MVT V = MVT::INVALID_SIMPLE_VALUE_TYPE;
+ Type *LLVMTy = nullptr;
public:
- constexpr EVT() : V(MVT::INVALID_SIMPLE_VALUE_TYPE), LLVMTy(nullptr) {}
- constexpr EVT(MVT::SimpleValueType SVT) : V(SVT), LLVMTy(nullptr) {}
- constexpr EVT(MVT S) : V(S), LLVMTy(nullptr) {}
+ constexpr EVT() = default;
+ constexpr EVT(MVT::SimpleValueType SVT) : V(SVT) {}
+ constexpr EVT(MVT S) : V(S) {}
bool operator==(EVT VT) const {
return !(*this != VT);
@@ -246,7 +249,6 @@ namespace llvm {
return getSizeInBits() <= VT.getSizeInBits();
}
-
/// Return the SimpleValueType held in the specified simple EVT.
MVT getSimpleVT() const {
assert(isSimple() && "Expected a SimpleValueType!");
@@ -430,6 +432,6 @@ namespace llvm {
unsigned getExtendedSizeInBits() const LLVM_READONLY;
};
-} // End llvm namespace
+} // end namespace llvm
-#endif
+#endif // LLVM_CODEGEN_VALUETYPES_H