aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/llvm/CodeGen/ValueTypes.h3
-rw-r--r--include/llvm/CodeGen/ValueTypes.td4
-rw-r--r--utils/TableGen/CodeGenTarget.cpp1
-rw-r--r--utils/TableGen/IntrinsicEmitter.cpp2
4 files changed, 9 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/ValueTypes.h b/include/llvm/CodeGen/ValueTypes.h
index e661c58940..f7e28bebfd 100644
--- a/include/llvm/CodeGen/ValueTypes.h
+++ b/include/llvm/CodeGen/ValueTypes.h
@@ -83,6 +83,9 @@ namespace llvm {
// This value must be a multiple of 32.
MAX_ALLOWED_VALUETYPE = 64,
+ // Metadata - This is MDNode or MDString.
+ Metadata = 251,
+
// iPTRAny - An int value the size of the pointer of the current
// target to any address space. This must only be used internal to
// tblgen. Other than for overloading, we treat iPTRAny the same as iPTR.
diff --git a/include/llvm/CodeGen/ValueTypes.td b/include/llvm/CodeGen/ValueTypes.td
index 7f6728bb67..76829344d2 100644
--- a/include/llvm/CodeGen/ValueTypes.td
+++ b/include/llvm/CodeGen/ValueTypes.td
@@ -57,7 +57,9 @@ def v4f32 : ValueType<128, 32>; // 4 x f32 vector value
def v8f32 : ValueType<256, 33>; // 8 x f32 vector value
def v2f64 : ValueType<128, 34>; // 2 x f64 vector value
def v4f64 : ValueType<256, 35>; // 4 x f64 vector value
-
+
+def MetadataVT: ValueType<0, 251>; // Metadata
+
// Pseudo valuetype mapped to the current pointer size to any address space.
// Should only be used in TableGen.
def iPTRAny : ValueType<0, 252>;
diff --git a/utils/TableGen/CodeGenTarget.cpp b/utils/TableGen/CodeGenTarget.cpp
index c17cd0eef2..c449660c42 100644
--- a/utils/TableGen/CodeGenTarget.cpp
+++ b/utils/TableGen/CodeGenTarget.cpp
@@ -118,6 +118,7 @@ std::string llvm::getEnumName(MVT::SimpleValueType T) {
case MVT::v4f64: return "MVT::v4f64";
case MVT::v3i32: return "MVT::v3i32";
case MVT::v3f32: return "MVT::v3f32";
+ case MVT::Metadata: return "MVT::Metadata";
case MVT::iPTR: return "MVT::iPTR";
case MVT::iPTRAny: return "MVT::iPTRAny";
default: assert(0 && "ILLEGAL VALUE TYPE!"); return "";
diff --git a/utils/TableGen/IntrinsicEmitter.cpp b/utils/TableGen/IntrinsicEmitter.cpp
index 36768316bc..f4157bb460 100644
--- a/utils/TableGen/IntrinsicEmitter.cpp
+++ b/utils/TableGen/IntrinsicEmitter.cpp
@@ -159,6 +159,8 @@ static void EmitTypeForValueType(raw_ostream &OS, MVT::SimpleValueType VT) {
OS << "Type::PPC_FP128Ty";
} else if (VT == MVT::isVoid) {
OS << "Type::VoidTy";
+ } else if (VT == MVT::Metadata) {
+ OS << "Type::MetadataTy";
} else {
assert(false && "Unsupported ValueType!");
}