[llvm-commits] [llvm] r62191 - in /llvm/trunk: include/llvm/CodeGen/MachineModuleInfo.h lib/CodeGen/AsmPrinter/DwarfWriter.cpp lib/CodeGen/MachineModuleInfo.cpp
Devang Patel
dpatel at apple.com
Tue Jan 13 15:02:17 PST 2009
Author: dpatel
Date: Tue Jan 13 17:02:17 2009
New Revision: 62191
URL: http://llvm.org/viewvc/llvm-project?rev=62191&view=rev
Log:
Keep "has debug info" big in MachineModuleInfo to avoid circular dependency between AsmPrinter and CodeGen.
Modified:
llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp
Modified: llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h?rev=62191&r1=62190&r2=62191&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h Tue Jan 13 17:02:17 2009
@@ -1041,6 +1041,10 @@
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 @@
/// 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; }
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp?rev=62191&r1=62190&r2=62191&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp Tue Jan 13 17:02:17 2009
@@ -3604,6 +3604,7 @@
MMI = mmi;
shouldEmit = true;
+ MMI->setDebugInfoAvailability(true);
// Create DIEs for each of the externally visible global variables.
ConstructGlobalVariableDIEs();
Modified: llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp?rev=62191&r1=62190&r2=62191&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp Tue Jan 13 17:02:17 2009
@@ -1630,6 +1630,7 @@
, Personalities()
, CallsEHReturn(0)
, CallsUnwindInit(0)
+, DbgInfoAvailable(false)
{
// Always emit "no personality" info
Personalities.push_back(NULL);
More information about the llvm-commits
mailing list