diff options
author | Devang Patel <dpatel@apple.com> | 2010-04-22 18:39:21 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-04-22 18:39:21 +0000 |
commit | 53f530d44c8c0c50c3f672daca2603e11d91cb38 (patch) | |
tree | ef6edfd8860377de6c30b803c3ac46a53a27a696 /llvm/lib | |
parent | 9628468d94e5b9aa4ab8138c7a5e2950822b013e (diff) | |
download | bcm5719-llvm-53f530d44c8c0c50c3f672daca2603e11d91cb38.tar.gz bcm5719-llvm-53f530d44c8c0c50c3f672daca2603e11d91cb38.zip |
Keep track of MCSymbol used to mark beginning of a function.
llvm-svn: 102104
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 6 | ||||
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index b245e45f3c1..676a96acfc4 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -330,6 +330,7 @@ DwarfDebug::DwarfDebug(AsmPrinter *A, Module *M) DwarfFrameSectionSym = DwarfInfoSectionSym = DwarfAbbrevSectionSym = 0; DwarfStrSectionSym = TextSectionSym = 0; DwarfDebugRangeSectionSym = 0; + FunctionBeginSym = 0; if (TimePassesIsEnabled) { NamedRegionTimer T(DbgTimerName, DWARFGroupName); beginModule(M); @@ -2444,9 +2445,10 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) { collectVariableInfo(); + FunctionBeginSym = Asm->GetTempSymbol("func_begin", + Asm->getFunctionNumber()); // Assumes in correct section after the entry point. - Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("func_begin", - Asm->getFunctionNumber())); + Asm->OutStreamer.EmitLabel(FunctionBeginSym); // Emit label for the implicitly defined dbg.stoppoint at the start of the // function. diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h index 4ae768abae6..380f2014c23 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h @@ -218,7 +218,8 @@ class DwarfDebug { // section offsets and are created by EmitSectionLabels. MCSymbol *DwarfFrameSectionSym, *DwarfInfoSectionSym, *DwarfAbbrevSectionSym; MCSymbol *DwarfStrSectionSym, *TextSectionSym, *DwarfDebugRangeSectionSym; - + + MCSymbol *FunctionBeginSym; private: /// getSourceDirectoryAndFileIds - Return the directory and file ids that |