diff options
Diffstat (limited to 'lib/VMCore/LLVMContext.cpp')
-rw-r--r-- | lib/VMCore/LLVMContext.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/VMCore/LLVMContext.cpp b/lib/VMCore/LLVMContext.cpp index f9d3fe0021..2a870ec6cf 100644 --- a/lib/VMCore/LLVMContext.cpp +++ b/lib/VMCore/LLVMContext.cpp @@ -26,7 +26,11 @@ LLVMContext& llvm::getGlobalContext() { return *GlobalContext; } -LLVMContext::LLVMContext() : pImpl(new LLVMContextImpl(*this)) { } +LLVMContext::LLVMContext() : pImpl(new LLVMContextImpl(*this)) { + // Create the first metadata kind, which is always 'dbg'. + unsigned DbgID = getMDKindID("dbg"); + assert(DbgID == MD_dbg && "dbg kind id drifted"); (void)DbgID; +} LLVMContext::~LLVMContext() { delete pImpl; } |