From 2f7d5291de87bfa195884e84dc0efe9705c2215c Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Wed, 16 Jun 2010 00:53:55 +0000 Subject: Use separate named MDNode to hold each function's local variable info. This speeds up local variable handling in DwarfDebug. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106075 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp') diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 4705a0eed3..7da363fa56 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -2259,8 +2259,9 @@ void DwarfDebug::collectVariableInfo(const MachineFunction *MF) { } // Collect info for variables that were optimized out. - if (NamedMDNode *NMD = - MF->getFunction()->getParent()->getNamedMetadata("llvm.dbg.lv")) { + const Twine FnLVName = Twine("llvm.dbg.lv.", MF->getFunction()->getName()); + if (NamedMDNode *NMD = + MF->getFunction()->getParent()->getNamedMetadataUsingTwine(FnLVName)) { for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i) { DIVariable DV(cast_or_null(NMD->getOperand(i))); if (!DV || !Processed.insert(DV)) -- cgit v1.2.3-18-g5258