[llvm-commits] [llvm] r167765 - in /llvm/trunk/lib/CodeGen/AsmPrinter: DwarfDebug.cpp DwarfDebug.h

Eric Christopher echristo at gmail.com
Mon Nov 12 14:22:20 PST 2012


Author: echristo
Date: Mon Nov 12 16:22:20 2012
New Revision: 167765

URL: http://llvm.org/viewvc/llvm-project?rev=167765&view=rev
Log:
Add an option to enable prototype "fission" capabilities and debug changes.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=167765&r1=167764&r2=167765&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Mon Nov 12 16:22:20 2012
@@ -78,6 +78,15 @@
                 clEnumValEnd),
      cl::init(Default));
 
+static cl::opt<DefaultOnOff> DwarfFission("dwarf-fission", cl::Hidden,
+     cl::desc("Output prototype dwarf fission."),
+     cl::values(
+                clEnumVal(Default, "Default for platform"),
+                clEnumVal(Enable, "Enabled"),
+                clEnumVal(Disable, "Disabled"),
+                clEnumValEnd),
+     cl::init(Default));
+
 namespace {
   const char *DWARFGroupName = "DWARF Emission";
   const char *DbgTimerName = "DWARF Debug Writer";
@@ -174,6 +183,11 @@
   } else
     hasDwarfAccelTables = DwarfAccelTables == Enable ? true : false;
 
+  if (DwarfFission == Default)
+    hasDwarfFission = false;
+  else
+    hasDwarfFission = DwarfFission == Enable ? true : false;
+
   {
     NamedRegionTimer T(DbgTimerName, DWARFGroupName, TimePassesIsEnabled);
     beginModule(M);

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h?rev=167765&r1=167764&r2=167765&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h Mon Nov 12 16:22:20 2012
@@ -319,6 +319,7 @@
   // A holder for the DarwinGDBCompat flag so that the compile unit can use it.
   bool isDarwinGDBCompat;
   bool hasDwarfAccelTables;
+  bool hasDwarfFission;
 private:
 
   /// assignAbbrevNumber - Define a unique number for the abbreviation.
@@ -537,6 +538,7 @@
   /// output to the limitations of darwin gdb.
   bool useDarwinGDBCompat() { return isDarwinGDBCompat; }
   bool useDwarfAccelTables() { return hasDwarfAccelTables; }
+  bool useDwarfFission() { return hasDwarfFission; }
 };
 } // End of namespace llvm
 





More information about the llvm-commits mailing list