[llvm-commits] [llvm] r65092 - in /llvm/trunk: include/llvm/CodeGen/DwarfWriter.h lib/CodeGen/AsmPrinter/DwarfWriter.cpp utils/TableGen/AsmWriterEmitter.cpp
Bill Wendling
isanbard at gmail.com
Thu Feb 19 16:44:43 PST 2009
Author: void
Date: Thu Feb 19 18:44:43 2009
New Revision: 65092
URL: http://llvm.org/viewvc/llvm-project?rev=65092&view=rev
Log:
Add an accessor method to DwarfWriter to tell of debugging info should be emitted.
Modified:
llvm/trunk/include/llvm/CodeGen/DwarfWriter.h
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp
Modified: llvm/trunk/include/llvm/CodeGen/DwarfWriter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/DwarfWriter.h?rev=65092&r1=65091&r2=65092&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/DwarfWriter.h (original)
+++ llvm/trunk/include/llvm/CodeGen/DwarfWriter.h Thu Feb 19 18:44:43 2009
@@ -101,6 +101,9 @@
///
void RecordVariable(GlobalVariable *GV, unsigned FrameIndex);
+ /// ShouldEmitDwarfDebug - Returns true if Dwarf debugging declarations should
+ /// be emitted.
+ bool ShouldEmitDwarfDebug() const;
};
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp?rev=65092&r1=65091&r2=65092&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp Thu Feb 19 18:44:43 2009
@@ -1331,9 +1331,10 @@
public:
- /// ShouldEmitDwarf - Returns true if Dwarf declarations should be made.
+ /// ShouldEmitDwarfDebug - Returns true if Dwarf debugging declarations should
+ /// be emitted.
///
- bool ShouldEmitDwarf() const { return shouldEmit; }
+ bool ShouldEmitDwarfDebug() const { return shouldEmit; }
/// AssignAbbrevNumber - Define a unique number for the abbreviation.
///
@@ -2963,7 +2964,7 @@
/// EndModule - Emit all Dwarf sections that should come after the content.
///
void EndModule() {
- if (!ShouldEmitDwarf()) return;
+ if (!ShouldEmitDwarfDebug()) return;
// Standard sections final addresses.
Asm->SwitchToSection(TAI->getTextSection());
@@ -3021,7 +3022,7 @@
void BeginFunction(MachineFunction *MF) {
this->MF = MF;
- if (!ShouldEmitDwarf()) return;
+ if (!ShouldEmitDwarfDebug()) return;
// Begin accumulating function debug information.
MMI->BeginFunction(MF);
@@ -3040,7 +3041,7 @@
/// EndFunction - Gather and emit post-function debug information.
///
void EndFunction(MachineFunction *MF) {
- if (!ShouldEmitDwarf()) return;
+ if (!ShouldEmitDwarfDebug()) return;
// Define end label for subprogram.
EmitLabel("func_end", SubprogramCount);
@@ -4329,3 +4330,8 @@
DD->RecordVariable(GV, FrameIndex);
}
+/// ShouldEmitDwarfDebug - Returns true if Dwarf debugging declarations should
+/// be emitted.
+bool DwarfWriter::ShouldEmitDwarfDebug() const {
+ return DD->ShouldEmitDwarfDebug();
+}
Modified: llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp?rev=65092&r1=65091&r2=65092&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp Thu Feb 19 18:44:43 2009
@@ -640,7 +640,8 @@
}
O << "\";\n\n";
- O << " if (TAI->doesSupportDebugInformation()) {\n"
+ O << " if (TAI->doesSupportDebugInformation() &&\n"
+ << " DW->ShouldEmitDwarfDebug()) {\n"
<< " const MachineFunction *MF = MI->getParent()->getParent();\n"
<< " DebugLoc CurDL = MI->getDebugLoc();\n\n"
<< " if (!CurDL.isUnknown()) {\n"
More information about the llvm-commits
mailing list