[cfe-commits] r109022 - /cfe/trunk/lib/CodeGen/CGCall.cpp

Devang Patel dpatel at apple.com
Wed Jul 21 11:08:50 PDT 2010


Author: dpatel
Date: Wed Jul 21 13:08:50 2010
New Revision: 109022

URL: http://llvm.org/viewvc/llvm-project?rev=109022&view=rev
Log:
Fix regression caused by r108911.
Do not override known debug loc with unknown debug loc.
This is tested by sections.exp in gdb testsuite.

Modified:
    cfe/trunk/lib/CodeGen/CGCall.cpp

Modified: cfe/trunk/lib/CodeGen/CGCall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=109022&r1=109021&r2=109022&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCall.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCall.cpp Wed Jul 21 13:08:50 2010
@@ -1058,7 +1058,8 @@
   }
 
   llvm::Instruction *Ret = RV ? Builder.CreateRet(RV) : Builder.CreateRetVoid();
-  Ret->setDebugLoc(RetDbgLoc);
+  if (!RetDbgLoc.isUnknown())
+    Ret->setDebugLoc(RetDbgLoc);
 }
 
 RValue CodeGenFunction::EmitDelegateCallArg(const VarDecl *Param) {





More information about the cfe-commits mailing list