[llvm-commits] [llvm] r65192 - in /llvm/branches/Apple/Dib: include/llvm/CodeGen/DwarfWriter.h lib/CodeGen/AsmPrinter/DwarfWriter.cpp utils/TableGen/AsmWriterEmitter.cpp
Bill Wendling
isanbard at gmail.com
Fri Feb 20 14:34:49 PST 2009
Author: void
Date: Fri Feb 20 16:34:49 2009
New Revision: 65192
URL: http://llvm.org/viewvc/llvm-project?rev=65192&view=rev
Log:
Pull r65092 into Dib:
Add an accessor method to DwarfWriter to tell of debugging info should be
emitted.
Modified:
llvm/branches/Apple/Dib/include/llvm/CodeGen/DwarfWriter.h
llvm/branches/Apple/Dib/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
llvm/branches/Apple/Dib/utils/TableGen/AsmWriterEmitter.cpp
Modified: llvm/branches/Apple/Dib/include/llvm/CodeGen/DwarfWriter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Dib/include/llvm/CodeGen/DwarfWriter.h?rev=65192&r1=65191&r2=65192&view=diff
==============================================================================
--- llvm/branches/Apple/Dib/include/llvm/CodeGen/DwarfWriter.h (original)
+++ llvm/branches/Apple/Dib/include/llvm/CodeGen/DwarfWriter.h Fri Feb 20 16:34:49 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/branches/Apple/Dib/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Dib/lib/CodeGen/AsmPrinter/DwarfWriter.cpp?rev=65192&r1=65191&r2=65192&view=diff
==============================================================================
--- llvm/branches/Apple/Dib/lib/CodeGen/AsmPrinter/DwarfWriter.cpp (original)
+++ llvm/branches/Apple/Dib/lib/CodeGen/AsmPrinter/DwarfWriter.cpp Fri Feb 20 16:34:49 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.
///
@@ -2960,7 +2961,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());
@@ -3018,7 +3019,7 @@
void BeginFunction(MachineFunction *MF) {
this->MF = MF;
- if (!ShouldEmitDwarf()) return;
+ if (!ShouldEmitDwarfDebug()) return;
// Begin accumulating function debug information.
MMI->BeginFunction(MF);
@@ -3037,7 +3038,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);
@@ -4326,3 +4327,8 @@
DD->RecordVariable(GV, FrameIndex);
}
+/// ShouldEmitDwarfDebug - Returns true if Dwarf debugging declarations should
+/// be emitted.
+bool DwarfWriter::ShouldEmitDwarfDebug() const {
+ return DD->ShouldEmitDwarfDebug();
+}
Modified: llvm/branches/Apple/Dib/utils/TableGen/AsmWriterEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Dib/utils/TableGen/AsmWriterEmitter.cpp?rev=65192&r1=65191&r2=65192&view=diff
==============================================================================
--- llvm/branches/Apple/Dib/utils/TableGen/AsmWriterEmitter.cpp (original)
+++ llvm/branches/Apple/Dib/utils/TableGen/AsmWriterEmitter.cpp Fri Feb 20 16:34:49 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