summaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/CloneFunction.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-08-28 23:24:31 +0000
committerDevang Patel <dpatel@apple.com>2009-08-28 23:24:31 +0000
commite4b275610a7a05b7ee4c0378a906a6330e4c4ab0 (patch)
treead839c82009fa9220c9934db785cfa5ee35c9d25 /lib/Transforms/Utils/CloneFunction.cpp
parente4e4ed3b56f63e9343e01bf0b2ecd7c1f45d296c (diff)
downloadllvm-e4b275610a7a05b7ee4c0378a906a6330e4c4ab0.tar.gz
llvm-e4b275610a7a05b7ee4c0378a906a6330e4c4ab0.tar.bz2
llvm-e4b275610a7a05b7ee4c0378a906a6330e4c4ab0.tar.xz
Reapply 79977.
Use MDNodes to encode debug info in llvm IR. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80406 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/CloneFunction.cpp')
-rw-r--r--lib/Transforms/Utils/CloneFunction.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Utils/CloneFunction.cpp b/lib/Transforms/Utils/CloneFunction.cpp
index a430fa00b5..fd72ca1d91 100644
--- a/lib/Transforms/Utils/CloneFunction.cpp
+++ b/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();
}