aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-06-22 01:01:58 +0000
committerDevang Patel <dpatel@apple.com>2010-06-22 01:01:58 +0000
commitb7edda0a45949d975f9ab7416ed61d1c96daaf56 (patch)
treea4b3552d35a8a8ba72af497656045e197383be67 /lib/CodeGen
parentecb7ab9897f20ca3e21c7168caf6f4c38ea3947f (diff)
downloadexternal_llvm-b7edda0a45949d975f9ab7416ed61d1c96daaf56.zip
external_llvm-b7edda0a45949d975f9ab7416ed61d1c96daaf56.tar.gz
external_llvm-b7edda0a45949d975f9ab7416ed61d1c96daaf56.tar.bz2
Do not rely on Twine temporaries to survive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106515 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 5f55a3d..41e4bfb 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -2257,9 +2257,10 @@ void DwarfDebug::collectVariableInfo(const MachineFunction *MF) {
}
// Collect info for variables that were optimized out.
- const Twine FnLVName = Twine("llvm.dbg.lv.", MF->getFunction()->getName());
- if (NamedMDNode *NMD =
- MF->getFunction()->getParent()->getNamedMetadataUsingTwine(FnLVName)) {
+ const Function *F = MF->getFunction();
+ const Module *M = F->getParent();
+ if (NamedMDNode *NMD =
+ M->getNamedMetadataUsingTwine(Twine("llvm.dbg.lv.", F->getName()))) {
for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i) {
DIVariable DV(cast_or_null<MDNode>(NMD->getOperand(i)));
if (!DV || !Processed.insert(DV))