diff options
author | Devang Patel <dpatel@apple.com> | 2009-01-13 23:02:17 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-01-13 23:02:17 +0000 |
commit | 86cfa40b308ff5bf55d77fa946f7294572d7ccaf (patch) | |
tree | 51d780ad00b78a166fa484290fd991282496a61b | |
parent | fb3a488e60c23d05db946b900e2184332e9d62bb (diff) | |
download | external_llvm-86cfa40b308ff5bf55d77fa946f7294572d7ccaf.zip external_llvm-86cfa40b308ff5bf55d77fa946f7294572d7ccaf.tar.gz external_llvm-86cfa40b308ff5bf55d77fa946f7294572d7ccaf.tar.bz2 |
Keep "has debug info" big in MachineModuleInfo to avoid circular dependency between AsmPrinter and CodeGen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62191 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/CodeGen/MachineModuleInfo.h | 9 | ||||
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfWriter.cpp | 1 | ||||
-rw-r--r-- | lib/CodeGen/MachineModuleInfo.cpp | 1 |
3 files changed, 9 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/MachineModuleInfo.h b/include/llvm/CodeGen/MachineModuleInfo.h index 1f4c534..347254d 100644 --- a/include/llvm/CodeGen/MachineModuleInfo.h +++ b/include/llvm/CodeGen/MachineModuleInfo.h @@ -1041,6 +1041,10 @@ private: bool CallsEHReturn; bool CallsUnwindInit; + + /// DbgInfoAvailable - True if debugging information is available + /// in this module. + bool DbgInfoAvailable; public: static char ID; // Pass identification, replacement for typeid @@ -1082,8 +1086,9 @@ public: /// hasDebugInfo - Returns true if valid debug info is present. /// - bool hasDebugInfo() const { return !CompileUnits.empty(); } - + bool hasDebugInfo() const { return DbgInfoAvailable; } + void setDebugInfoAvailability(bool avail) { DbgInfoAvailable = true; } + bool callsEHReturn() const { return CallsEHReturn; } void setCallsEHReturn(bool b) { CallsEHReturn = b; } diff --git a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp index 0687fd8..e17dd52 100644 --- a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp @@ -3604,6 +3604,7 @@ public: MMI = mmi; shouldEmit = true; + MMI->setDebugInfoAvailability(true); // Create DIEs for each of the externally visible global variables. ConstructGlobalVariableDIEs(); diff --git a/lib/CodeGen/MachineModuleInfo.cpp b/lib/CodeGen/MachineModuleInfo.cpp index f93f27c..5fe59d4 100644 --- a/lib/CodeGen/MachineModuleInfo.cpp +++ b/lib/CodeGen/MachineModuleInfo.cpp @@ -1630,6 +1630,7 @@ MachineModuleInfo::MachineModuleInfo() , Personalities() , CallsEHReturn(0) , CallsUnwindInit(0) +, DbgInfoAvailable(false) { // Always emit "no personality" info Personalities.push_back(NULL); |