[llvm] r188711 - Use less verbose code and update comments.
Eric Christopher
echristo at gmail.com
Mon Aug 19 14:41:38 PDT 2013
Author: echristo
Date: Mon Aug 19 16:41:38 2013
New Revision: 188711
URL: http://llvm.org/viewvc/llvm-project?rev=188711&view=rev
Log:
Use less verbose code and update comments.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=188711&r1=188710&r2=188711&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Mon Aug 19 16:41:38 2013
@@ -205,36 +205,29 @@ DwarfDebug::DwarfDebug(AsmPrinter *A, Mo
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());
More information about the llvm-commits
mailing list