diff options
author | Chen Li <meloli87@gmail.com> | 2015-08-04 04:41:34 +0000 |
---|---|---|
committer | Chen Li <meloli87@gmail.com> | 2015-08-04 04:41:34 +0000 |
commit | 0003878466b18808018577efa64d1dc4067d0a5b (patch) | |
tree | f4909f6912eeea9c6b0175093a978c10190e942e /llvm/lib/IR | |
parent | bfcb6c870a5abd9acfb3f9de66b37569a152eafd (diff) | |
download | bcm5719-llvm-0003878466b18808018577efa64d1dc4067d0a5b.tar.gz bcm5719-llvm-0003878466b18808018577efa64d1dc4067d0a5b.zip |
Introduce enum value for previously defined metadata -- make.implicit
Summary: This patch adds enum value for an existing metadata type -- make.implicit. Using preassigned enum will be helpful to get compile time type checking and avoid string construction and comparison. The patch also changes uses of make.implicit from string metadata to enum metadata. There is no functionality change.
Reviewers: reames
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11698
llvm-svn: 243954
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r-- | llvm/lib/IR/LLVMContext.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/IR/LLVMContext.cpp b/llvm/lib/IR/LLVMContext.cpp index 6d799e4b965..59680f5eef5 100644 --- a/llvm/lib/IR/LLVMContext.cpp +++ b/llvm/lib/IR/LLVMContext.cpp @@ -104,6 +104,12 @@ LLVMContext::LLVMContext() : pImpl(new LLVMContextImpl(*this)) { assert(DereferenceableOrNullID == MD_dereferenceable_or_null && "dereferenceable_or_null kind id drifted"); (void)DereferenceableOrNullID; + + // Create the 'make.implicit' metadata kind. + unsigned MakeImplicitID = getMDKindID("make.implicit"); + assert(MakeImplicitID == MD_make_implicit && + "make.implicit kind id drifted"); + (void)MakeImplicitID; } LLVMContext::~LLVMContext() { delete pImpl; } |