aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/CloneFunction.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-08-25 05:24:07 +0000
committerDevang Patel <dpatel@apple.com>2009-08-25 05:24:07 +0000
commit02aac922b43d99b7162acb08fd75ea7c98cfb48f (patch)
treed06f2b64367cd18c3e24b3f03a575d83cb785b4d /llvm/lib/Transforms/Utils/CloneFunction.cpp
parentc1eb79b7c9fa063f7b6f6261d2dd6af9a70c915c (diff)
downloadllvm-02aac922b43d99b7162acb08fd75ea7c98cfb48f.zip
llvm-02aac922b43d99b7162acb08fd75ea7c98cfb48f.tar.gz
llvm-02aac922b43d99b7162acb08fd75ea7c98cfb48f.tar.bz2
Update DebugInfo interface to use metadata, instead of special named llvm.dbg.... global variables, to encode debugging information in llvm IR. This is mostly a mechanical change that tests metadata support very well.
This change speeds up llvm-gcc by more then 6% at "-O0 -g" (measured by compiling InstructionCombining.cpp!) llvm-svn: 79977
Diffstat (limited to 'llvm/lib/Transforms/Utils/CloneFunction.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/CloneFunction.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp
index a6df161..f66a267 100644
--- a/llvm/lib/Transforms/Utils/CloneFunction.cpp
+++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp
@@ -238,7 +238,7 @@ void PruningFunctionCloner::CloneBlock(const BasicBlock *BB,
// Do not clone llvm.dbg.region.end. It will be adjusted by the inliner.
if (const DbgFuncStartInst *DFSI = dyn_cast<DbgFuncStartInst>(II)) {
if (DbgFnStart == NULL) {
- DISubprogram SP(cast<GlobalVariable>(DFSI->getSubprogram()));
+ DISubprogram SP(DFSI->getSubprogram());
if (SP.describes(BB->getParent()))
DbgFnStart = DFSI->getSubprogram();
}