Add an option to enable prototype "fission" capabilities and debug changes.
authorEric Christopher <echristo@gmail.com>
Mon, 12 Nov 2012 22:22:20 +0000 (22:22 +0000)
committerEric Christopher <echristo@gmail.com>
Mon, 12 Nov 2012 22:22:20 +0000 (22:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167765 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 367b52307925ecd720c13d692d184ff5bff3c111..742a779b6fe325dd58e4a6b63fbb50595a19c7a1 100644 (file)
@@ -78,6 +78,15 @@ static cl::opt<DefaultOnOff> DarwinGDBCompat("darwin-gdb-compat", cl::Hidden,
                 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 @@ DwarfDebug::DwarfDebug(AsmPrinter *A, Module *M)
   } else
     hasDwarfAccelTables = DwarfAccelTables == Enable ? true : false;
 
+  if (DwarfFission == Default)
+    hasDwarfFission = false;
+  else
+    hasDwarfFission = DwarfFission == Enable ? true : false;
+
   {
     NamedRegionTimer T(DbgTimerName, DWARFGroupName, TimePassesIsEnabled);
     beginModule(M);
index 61d9a51a52791433a9801b601ff834823b6a7278..1188ffa73ca2d49a4b74ef790f5b0b463a3958e2 100644 (file)
@@ -319,6 +319,7 @@ class DwarfDebug {
   // 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 @@ public:
   /// output to the limitations of darwin gdb.
   bool useDarwinGDBCompat() { return isDarwinGDBCompat; }
   bool useDwarfAccelTables() { return hasDwarfAccelTables; }
+  bool useDwarfFission() { return hasDwarfFission; }
 };
 } // End of namespace llvm