From: Dan Gohman Date: Thu, 13 Sep 2012 17:56:17 +0000 (+0000) Subject: Define an official slot for the new !tbaa.struct metadata tag. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b54834b7e67ac04874891f3dcf69226c69582b4b;p=oota-llvm.git Define an official slot for the new !tbaa.struct metadata tag. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163815 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/LLVMContext.h b/include/llvm/LLVMContext.h index a8306a9e761..302f5915361 100644 --- a/include/llvm/LLVMContext.h +++ b/include/llvm/LLVMContext.h @@ -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. diff --git a/lib/VMCore/LLVMContext.cpp b/lib/VMCore/LLVMContext.cpp index f07f0b39392..2446ec996d0 100644 --- a/lib/VMCore/LLVMContext.cpp +++ b/lib/VMCore/LLVMContext.cpp @@ -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; }