diff options
| author | Chris Lattner <sabre@nondot.org> | 2010-04-01 06:31:43 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2010-04-01 06:31:43 +0000 |
| commit | c60346388d60b1756f3675dabb60dc58da0728ec (patch) | |
| tree | 626b0516cbc5d52c9fffcba487f62d2aca68c3d8 /lib/CodeGen/CodeGenModule.cpp | |
| parent | 3a3e584cc2db4ef44a63b5903b2a98986234da54 (diff) | |
| download | clang-c60346388d60b1756f3675dabb60dc58da0728ec.tar.gz clang-c60346388d60b1756f3675dabb60dc58da0728ec.tar.bz2 clang-c60346388d60b1756f3675dabb60dc58da0728ec.tar.xz | |
adjust to IRBuilder change and use faster DebugLoc apis.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100093 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
| -rw-r--r-- | lib/CodeGen/CodeGenModule.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 65aceb741a..3c872c8560 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -1245,9 +1245,9 @@ static void ReplaceUsesOfNonProtoTypeWithRealFunction(llvm::GlobalValue *Old, if (!CI->use_empty()) CI->replaceAllUsesWith(NewCall); - // Copy any custom metadata attached with CI. - if (llvm::MDNode *DbgNode = CI->getDbgMetadata()) - NewCall->setDbgMetadata(DbgNode); + // Copy debug location attached to CI. + if (!CI->getDebugLoc().isUnknown()) + NewCall->setDebugLoc(CI->getDebugLoc()); CI->eraseFromParent(); } } |
