CurFn is only used for relocations. Use EmissionDetails.MF->getFunction() instead.
authorNicolas Geoffray <nicolas.geoffray@lip6.fr>
Sun, 4 Apr 2010 10:31:49 +0000 (10:31 +0000)
committerNicolas Geoffray <nicolas.geoffray@lip6.fr>
Sun, 4 Apr 2010 10:31:49 +0000 (10:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100328 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/JIT/JITEmitter.cpp

index a2df2d09b85c28ce9800436873368ed43b4c1c17..7b8ab9ed3f58b17af1d2f5a40ba15e037e0a2025 100644 (file)
@@ -825,7 +825,8 @@ void JITEmitter::processDebugLoc(DebugLoc DL, bool BeforePrintingInsn) {
   if (!BeforePrintingInsn) return;
 
   // FIXME: This is horribly inefficient.
-  DILocation CurDLT(DL.getAsMDNode(CurFn->getContext()));
+  DILocation CurDLT(DL.getAsMDNode(
+    EmissionDetails.MF->getFunction()->getContext()));
   
   if (CurDLT.getScope().getNode() != 0 && PrevDLT.getNode() !=CurDLT.getNode()){
     JITEvent_EmittedFunctionDetails::LineStart NextLine;