Fix regression caused by r108911.

Do not override known debug loc with unknown debug loc.
This is tested by sections.exp in gdb testsuite.

llvm-svn: 109022
This commit is contained in:
Devang Patel 2010-07-21 18:08:50 +00:00
parent 846b9e15db
commit 65497583b5
1 changed files with 2 additions and 1 deletions

View File

@ -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) {