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
This commit is contained in:
Eric Christopher 2012-11-12 22:22:20 +00:00
parent fa77cced0b
commit f5b6dcd392
2 changed files with 16 additions and 0 deletions

View 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);

View 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