summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/DwarfWriter.cpp
diff options
context:
space:
mode:
authorJim Laskey <jlaskey@mac.com>2006-01-04 14:30:12 +0000
committerJim Laskey <jlaskey@mac.com>2006-01-04 14:30:12 +0000
commit2741e8304c6c015707b9864f0af5463110bb9304 (patch)
treeeca330caa0d20b640bf010c5d19de40c1b38c496 /llvm/lib/CodeGen/DwarfWriter.cpp
parentc972f0504ab0122491c4746082a12acfa767019e (diff)
downloadbcm5719-llvm-2741e8304c6c015707b9864f0af5463110bb9304.tar.gz
bcm5719-llvm-2741e8304c6c015707b9864f0af5463110bb9304.zip
Add check for debug presence.
llvm-svn: 25095
Diffstat (limited to 'llvm/lib/CodeGen/DwarfWriter.cpp')
-rw-r--r--llvm/lib/CodeGen/DwarfWriter.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/DwarfWriter.cpp b/llvm/lib/CodeGen/DwarfWriter.cpp
index 2fc65e6f956..c62cf8996f7 100644
--- a/llvm/lib/CodeGen/DwarfWriter.cpp
+++ b/llvm/lib/CodeGen/DwarfWriter.cpp
@@ -70,6 +70,7 @@ void DwarfWriter::EmitSLEB128Bytes(int Value, std::string Comment) {
/// 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 @@ void DwarfWriter::BeginModule() {
/// 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 @@ void DwarfWriter::EndModule() {
/// 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");
}
OpenPOWER on IntegriCloud