[llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp
Jim Laskey
jlaskey at apple.com
Wed Jan 4 06:30:24 PST 2006
Changes in directory llvm/lib/CodeGen:
DwarfWriter.cpp updated: 1.3 -> 1.4
---
Log message:
Add check for debug presence.
---
Diffs of the changes: (+4 -0)
DwarfWriter.cpp | 4 ++++
1 files changed, 4 insertions(+)
Index: llvm/lib/CodeGen/DwarfWriter.cpp
diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.3 llvm/lib/CodeGen/DwarfWriter.cpp:1.4
--- llvm/lib/CodeGen/DwarfWriter.cpp:1.3 Wed Jan 4 07:52:30 2006
+++ llvm/lib/CodeGen/DwarfWriter.cpp Wed Jan 4 08:30:12 2006
@@ -70,6 +70,7 @@
/// BeginModule - Emit all dwarf sections that should come prior to the content.
///
void DwarfWriter::BeginModule() {
+ if (!DebugInfo.hasInfo()) return;
EmitComment("Dwarf Begin Module");
// define base addresses for dwarf sections
@@ -84,6 +85,7 @@
/// EndModule - Emit all dwarf sections that should come after the content.
///
void DwarfWriter::EndModule() {
+ if (!DebugInfo.hasInfo()) return;
EmitComment("Dwarf End Module");
// Print out dwarf file info
std::vector<std::string> Sources = DebugInfo.getSourceFiles();
@@ -96,12 +98,14 @@
/// BeginFunction - Emit pre-function debug information.
///
void DwarfWriter::BeginFunction() {
+ if (!DebugInfo.hasInfo()) return;
EmitComment("Dwarf Begin Function");
}
/// EndFunction - Emit post-function debug information.
///
void DwarfWriter::EndFunction() {
+ if (!DebugInfo.hasInfo()) return;
EmitComment("Dwarf End Function");
}
More information about the llvm-commits
mailing list