From: Devang Patel Date: Wed, 21 Jul 2010 18:08:50 +0000 (+0000) Subject: Fix regression caused by r108911. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d3f265d68b2609a29acddb6de0b7e3b4dbe16204;p=clang Fix regression caused by r108911. Do not override known debug loc with unknown debug loc. This is tested by sections.exp in gdb testsuite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109022 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index c127d9281f..b22e349d95 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/lib/CodeGen/CGCall.cpp @@ -1058,7 +1058,8 @@ void CodeGenFunction::EmitFunctionEpilog(const CGFunctionInfo &FI) { } llvm::Instruction *Ret = RV ? Builder.CreateRet(RV) : Builder.CreateRetVoid(); - Ret->setDebugLoc(RetDbgLoc); + if (!RetDbgLoc.isUnknown()) + Ret->setDebugLoc(RetDbgLoc); } RValue CodeGenFunction::EmitDelegateCallArg(const VarDecl *Param) {