Add a flag to DwarfDebug to allow it to communicate whether or not
authorEric Christopher <echristo@apple.com>
Thu, 23 Aug 2012 22:36:36 +0000 (22:36 +0000)
committerEric Christopher <echristo@apple.com>
Thu, 23 Aug 2012 22:36:36 +0000 (22:36 +0000)
we're using the darwin old gdb compat mode for emitting dwarf.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162486 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfDebug.cpp
lib/CodeGen/AsmPrinter/DwarfDebug.h

index d9dcd334a94a399858cd9be4dfb601104cdf653f..1991785b119028f8216180f3d1ddc1b22e9c6b47 100644 (file)
@@ -145,6 +145,8 @@ DwarfDebug::DwarfDebug(AsmPrinter *A, Module *M)
     DwarfAccelTables = true;
     DarwinGDBCompat = true;
   }
+
+  isDarwinGDBCompat = DarwinGDBCompat;
   
   {
     NamedRegionTimer T(DbgTimerName, DWARFGroupName, TimePassesIsEnabled);
index d1d651265507d0296718491dfb24e75a02cb5431..78c871688e66f2647c42479e50c8a132e0a151da 100644 (file)
@@ -307,6 +307,9 @@ class DwarfDebug {
   // table for the same directory as DW_at_comp_dir.
   StringRef CompilationDir;
 
+  // A holder for the DarwinGDBCompat flag so that the compile unit can use it.
+  bool isDarwinGDBCompat;
+
 private:
 
   /// assignAbbrevNumber - Define a unique number for the abbreviation.
@@ -520,6 +523,10 @@ public:
   /// getStringPoolEntry - returns an entry into the string pool with the given
   /// string text.
   MCSymbol *getStringPoolEntry(StringRef Str);
+
+  /// useDarwinGDBCompat - returns whether or not to limit some of our debug
+  /// output to the limitations of darwin gdb.
+  bool useDarwinGDBCompat() { return isDarwinGDBCompat; }
 };
 } // End of namespace llvm