[llvm-commits] [llvm-gcc-4.2] r92237 - /llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
Chris Lattner
sabre at nondot.org
Mon Dec 28 15:41:53 PST 2009
Author: lattner
Date: Mon Dec 28 17:41:53 2009
New Revision: 92237
URL: http://llvm.org/viewvc/llvm-project?rev=92237&view=rev
Log:
adjust for llvm api changes.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp?rev=92237&r1=92236&r2=92237&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp Mon Dec 28 17:41:53 2009
@@ -376,15 +376,11 @@
Instruction *Call = DebugFactory.InsertDeclare(AI, D,
Builder.GetInsertBlock());
-// llvm::DIDescriptor DR = RegionStack.back();
-// llvm::DIScope DS = llvm::DIScope(DR.getNode());
llvm::DILocation DO(NULL);
llvm::DILocation DL =
DebugFactory.CreateLocation(CurLineNo, 0 /* column */, VarScope, DO);
- llvm::LLVMContext &Context = Call->getContext();
- unsigned DbgMDKind = Context.getMetadata().getMDKindID("dbg");
- Context.getMetadata().addMD(DbgMDKind, DL.getNode(), Call);
+ Call->setMetadata("dbg", DL.getNode());
}
@@ -398,8 +394,7 @@
// In an earlier part of gcc, code that sets up Apple Block by-reference
// variables at the beginning of the function (which should be part of the
// prologue but isn't), is assigned a source location line of one before the
- // function decl. So we check for that here:
-
+ // function decl. We check for that here.
if (BLOCK_SYNTHESIZED_FUNC(cfun->decl)) {
int fn_decl_line = DECL_SOURCE_LINE(cfun->decl);
if (lineno == (unsigned)(fn_decl_line - 1))
More information about the llvm-commits
mailing list