[llvm-commits] [dragonegg] r92720 - /dragonegg/trunk/llvm-debug.cpp

Duncan Sands baldrick at free.fr
Tue Jan 5 00:41:03 PST 2010


Author: baldrick
Date: Tue Jan  5 02:41:03 2010
New Revision: 92720

URL: http://llvm.org/viewvc/llvm-project?rev=92720&view=rev
Log:
Port commit 92237 (lattner) from llvm-gcc:
adjust for llvm api changes.

Modified:
    dragonegg/trunk/llvm-debug.cpp

Modified: dragonegg/trunk/llvm-debug.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-debug.cpp?rev=92720&r1=92719&r2=92720&view=diff

==============================================================================
--- dragonegg/trunk/llvm-debug.cpp (original)
+++ dragonegg/trunk/llvm-debug.cpp Tue Jan  5 02:41:03 2010
@@ -369,15 +369,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());
 }
 
 /// EmitStopPoint - Emit a call to llvm.dbg.stoppoint to indicate a change of 





More information about the llvm-commits mailing list