summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-12-28 23:41:39 +0000
committerChris Lattner <sabre@nondot.org>2009-12-28 23:41:39 +0000
commit9f021fd05d07e60a9bf3a7ff7969e15ad1cbdb2c (patch)
tree48967206bd2f82e22db28781c7fbff751e674c19 /clang/lib/CodeGen
parent2f2aa2b0674230bd407729b188e9f8113bffadb0 (diff)
downloadbcm5719-llvm-9f021fd05d07e60a9bf3a7ff7969e15ad1cbdb2c.tar.gz
bcm5719-llvm-9f021fd05d07e60a9bf3a7ff7969e15ad1cbdb2c.zip
adjust for llvm api changes.
llvm-svn: 92236
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 0f590a31747..5fa9da10899 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -26,7 +26,6 @@
#include "llvm/DerivedTypes.h"
#include "llvm/Instructions.h"
#include "llvm/Intrinsics.h"
-#include "llvm/LLVMContext.h"
#include "llvm/Module.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/SmallVector.h"
@@ -1219,10 +1218,7 @@ void CGDebugInfo::EmitDeclare(const VarDecl *Decl, unsigned Tag,
llvm::DILocation DO(NULL);
llvm::DILocation DL = DebugFactory.CreateLocation(Line, Column, DS, DO);
- // TODO: Remove #include of LLVMContext from this.
- llvm::LLVMContext &Context = Call->getContext();
- unsigned DbgMDKind = Context.getMetadata().getMDKindID("dbg");
- Context.getMetadata().addMD(DbgMDKind, DL.getNode(), Call);
+ Call->setMetadata("dbg", DL.getNode());
}
/// EmitDeclare - Emit local variable declaration debug info.
@@ -1424,11 +1420,7 @@ void CGDebugInfo::EmitDeclare(const BlockDeclRefExpr *BDRE, unsigned Tag,
llvm::DILocation DL =
DebugFactory.CreateLocation(Line, PLoc.getColumn(), DS, DO);
- // TODO: Remove #include of LLVMContext from this.
- llvm::LLVMContext &Context = Call->getContext();
- unsigned DbgMDKind = Context.getMetadata().getMDKindID("dbg");
- Context.getMetadata().addMD(DbgMDKind, DL.getNode(), Call);
-
+ Call->setMetadata("dbg", DL.getNode());
}
void CGDebugInfo::EmitDeclareOfAutoVariable(const VarDecl *Decl,
OpenPOWER on IntegriCloud