aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2012-11-12 22:22:20 +0000
committerEric Christopher <echristo@gmail.com>2012-11-12 22:22:20 +0000
commitf5b6dcd3929fe04c81aca1d69f69bbc530de148f (patch)
treec247abb6137f5e7523c21e60863bedbab66d465d /lib/CodeGen
parentfa77cced0b7727f0d3c9c49cb2f3cbdc8ae52c3e (diff)
downloadexternal_llvm-f5b6dcd3929fe04c81aca1d69f69bbc530de148f.zip
external_llvm-f5b6dcd3929fe04c81aca1d69f69bbc530de148f.tar.gz
external_llvm-f5b6dcd3929fe04c81aca1d69f69bbc530de148f.tar.bz2
Add an option to enable prototype "fission" capabilities and debug changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167765 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp14
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.h2
2 files changed, 16 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 367b523..742a779 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -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);
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.h b/lib/CodeGen/AsmPrinter/DwarfDebug.h
index 61d9a51..1188ffa 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.h
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.h
@@ -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