summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-07-20 20:13:52 +0000
committerDan Gohman <gohman@apple.com>2010-07-20 20:13:52 +0000
commit481e40c681309f142866b8925408081f29146e5a (patch)
tree3d0c48e2afe2f516102d9af6052b657c6ea12b04 /clang/lib/CodeGen
parentd2c7e52d05c2b9416b0ec9ddeef0bbc493a395ba (diff)
downloadbcm5719-llvm-481e40c681309f142866b8925408081f29146e5a.tar.gz
bcm5719-llvm-481e40c681309f142866b8925408081f29146e5a.zip
Use getDebugLoc and setDebugLoc instead of getDbgMetadata and setDbgMetadata,
avoiding MDNode overhead. llvm-svn: 108911
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGCall.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index 3d1e143dca2..c127d9281f1 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/lib/CodeGen/CGCall.cpp
@@ -1000,7 +1000,7 @@ void CodeGenFunction::EmitFunctionEpilog(const CGFunctionInfo &FI) {
return;
}
- llvm::MDNode *RetDbgInfo = 0;
+ llvm::DebugLoc RetDbgLoc;
llvm::Value *RV = 0;
QualType RetTy = FI.getReturnType();
const ABIArgInfo &RetAI = FI.getReturnInfo();
@@ -1034,7 +1034,7 @@ void CodeGenFunction::EmitFunctionEpilog(const CGFunctionInfo &FI) {
RV = Builder.CreateLoad(ReturnValue);
} else {
// Get the stored value and nuke the now-dead store.
- RetDbgInfo = SI->getDbgMetadata();
+ RetDbgLoc = SI->getDebugLoc();
RV = SI->getValueOperand();
SI->eraseFromParent();
@@ -1058,8 +1058,7 @@ void CodeGenFunction::EmitFunctionEpilog(const CGFunctionInfo &FI) {
}
llvm::Instruction *Ret = RV ? Builder.CreateRet(RV) : Builder.CreateRetVoid();
- if (RetDbgInfo)
- Ret->setDbgMetadata(RetDbgInfo);
+ Ret->setDebugLoc(RetDbgLoc);
}
RValue CodeGenFunction::EmitDelegateCallArg(const VarDecl *Param) {
OpenPOWER on IntegriCloud