diff options
| author | Devang Patel <dpatel@apple.com> | 2010-06-22 01:01:58 +0000 |
|---|---|---|
| committer | Devang Patel <dpatel@apple.com> | 2010-06-22 01:01:58 +0000 |
| commit | ad51735794a86624cbf31aa789b61692e7f0329f (patch) | |
| tree | 7bb7d3e746fe86e0e5ba24e7969b32bc1883220b /llvm/lib/CodeGen/AsmPrinter | |
| parent | 60bb7c42a770bc4c02c47a228a9b33c17537242d (diff) | |
| download | bcm5719-llvm-ad51735794a86624cbf31aa789b61692e7f0329f.tar.gz bcm5719-llvm-ad51735794a86624cbf31aa789b61692e7f0329f.zip | |
Do not rely on Twine temporaries to survive.
llvm-svn: 106515
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 5f55a3dfa51..41e4bfbaff3 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/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)) |

