aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2013-08-19 21:41:38 +0000
committerEric Christopher <echristo@gmail.com>2013-08-19 21:41:38 +0000
commit05bae3bfe47b63976cfa63b4756d3e768dd9eebc (patch)
tree6c13c7e1aec838ad3d44b5114f3e2469ec8e6a51 /lib
parent89062b838789d61460886c5c4c3838690a800de7 (diff)
downloadexternal_llvm-05bae3bfe47b63976cfa63b4756d3e768dd9eebc.zip
external_llvm-05bae3bfe47b63976cfa63b4756d3e768dd9eebc.tar.gz
external_llvm-05bae3bfe47b63976cfa63b4756d3e768dd9eebc.tar.bz2
Use less verbose code and update comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188711 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp39
1 files changed, 16 insertions, 23 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 1de4fca..01980e6 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -205,36 +205,29 @@ DwarfDebug::DwarfDebug(AsmPrinter *A, Module *M)
FunctionBeginSym = FunctionEndSym = 0;
// Turn on accelerator tables and older gdb compatibility
- // for Darwin.
+ // for Darwin by default, pubnames by default for non-Darwin,
+ // and handle split dwarf.
bool IsDarwin = Triple(A->getTargetTriple()).isOSDarwin();
- if (DarwinGDBCompat == Default) {
- if (IsDarwin)
- IsDarwinGDBCompat = true;
- else
- IsDarwinGDBCompat = false;
- } else
- IsDarwinGDBCompat = DarwinGDBCompat == Enable ? true : false;
- if (DwarfAccelTables == Default) {
- if (IsDarwin)
- HasDwarfAccelTables = true;
- else
- HasDwarfAccelTables = false;
- } else
- HasDwarfAccelTables = DwarfAccelTables == Enable ? true : false;
+ if (DarwinGDBCompat == Default)
+ IsDarwinGDBCompat = IsDarwin;
+ else
+ IsDarwinGDBCompat = DarwinGDBCompat == Enable;
+
+ if (DwarfAccelTables == Default)
+ HasDwarfAccelTables = IsDarwin;
+ else
+ HasDwarfAccelTables = DwarfAccelTables = Enable;
if (SplitDwarf == Default)
HasSplitDwarf = false;
else
- HasSplitDwarf = SplitDwarf == Enable ? true : false;
+ HasSplitDwarf = SplitDwarf == Enable;
- if (DwarfPubNames == Default) {
- if (IsDarwin)
- HasDwarfPubNames = false;
- else
- HasDwarfPubNames = true;
- } else
- HasDwarfPubNames = DwarfPubNames == Enable ? true : false;
+ if (DwarfPubNames == Default)
+ HasDwarfPubNames = !IsDarwin;
+ else
+ HasDwarfPubNames = DwarfPubNames == Enable;
DwarfVersion = getDwarfVersionFromModule(MMI->getModule());