Define an official slot for the new !tbaa.struct metadata tag.
authorDan Gohman <gohman@apple.com>
Thu, 13 Sep 2012 17:56:17 +0000 (17:56 +0000)
committerDan Gohman <gohman@apple.com>
Thu, 13 Sep 2012 17:56:17 +0000 (17:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163815 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/LLVMContext.h
lib/VMCore/LLVMContext.cpp

index a8306a9e7617cf848b032647d1655ed6b333ab47..302f591536187f19e2b301b630a40c3d458c7d98 100644 (file)
@@ -43,7 +43,8 @@ public:
     MD_tbaa = 1, // "tbaa"
     MD_prof = 2,  // "prof"
     MD_fpmath = 3,  // "fpmath"
-    MD_range = 4 // "range"
+    MD_range = 4, // "range"
+    MD_tbaa_struct = 5 // "tbaa.struct"
   };
   
   /// getMDKindID - Return a unique non-zero ID for the specified metadata kind.
index f07f0b3939262db465d801c7ce484a55c40c7ca3..2446ec996d043d63607b42782add9ab6fe7ac890 100644 (file)
@@ -53,6 +53,11 @@ LLVMContext::LLVMContext() : pImpl(new LLVMContextImpl(*this)) {
   unsigned RangeID = getMDKindID("range");
   assert(RangeID == MD_range && "range kind id drifted");
   (void)RangeID;
+
+  // Create the 'tbaa.struct' metadata kind.
+  unsigned TBAAStructID = getMDKindID("tbaa.struct");
+  assert(TBAAStructID == MD_tbaa_struct && "tbaa.struct kind id drifted");
+  (void)TBAAStructID;
 }
 LLVMContext::~LLVMContext() { delete pImpl; }