[llvm] r201378 - Disable emission of aranges by default and add a command line

Eric Christopher echristo at gmail.com
Thu Feb 13 17:26:55 PST 2014


Author: echristo
Date: Thu Feb 13 19:26:55 2014
New Revision: 201378

URL: http://llvm.org/viewvc/llvm-project?rev=201378&view=rev
Log:
Disable emission of aranges by default and add a command line
option to enable again that will be matched with a commit to enable
in clang.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
    llvm/trunk/test/DebugInfo/X86/arange.ll
    llvm/trunk/test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll
    llvm/trunk/test/DebugInfo/X86/dwarf-aranges.ll
    llvm/trunk/test/DebugInfo/X86/fission-cu.ll
    llvm/trunk/test/DebugInfo/X86/multiple-aranges.ll

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=201378&r1=201377&r2=201378&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Thu Feb 13 19:26:55 2014
@@ -67,6 +67,11 @@ GenerateGnuPubSections("generate-gnu-dwa
                        cl::desc("Generate GNU-style pubnames and pubtypes"),
                        cl::init(false));
 
+static cl::opt<bool> GenerateARangeSection("generate-arange-section",
+                                           cl::Hidden,
+                                           cl::desc("Generate dwarf aranges"),
+                                           cl::init(false));
+
 namespace {
 enum DefaultOnOff { Default, Enable, Disable };
 }
@@ -1154,7 +1159,8 @@ void DwarfDebug::endModule() {
   emitDebugLoc();
 
   // Emit info into a debug aranges section.
-  emitDebugARanges();
+  if (GenerateARangeSection)
+    emitDebugARanges();
 
   // Emit info into a debug ranges section.
   emitDebugRanges();

Modified: llvm/trunk/test/DebugInfo/X86/arange.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/arange.ll?rev=201378&r1=201377&r2=201378&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/arange.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/arange.ll Thu Feb 13 19:26:55 2014
@@ -1,7 +1,7 @@
 ; REQUIRES: object-emission
 
-; RUN: llc -mtriple=x86_64-linux -O0 -filetype=obj < %s | llvm-dwarfdump -debug-dump=aranges - | FileCheck %s
-; RUN: llc -mtriple=x86_64-linux -O0 -filetype=obj < %s | llvm-readobj --relocations - | FileCheck --check-prefix=OBJ %s
+; RUN: llc -mtriple=x86_64-linux -O0 -filetype=obj -generate-arange-section < %s | llvm-dwarfdump -debug-dump=aranges - | FileCheck %s
+; RUN: llc -mtriple=x86_64-linux -O0 -filetype=obj -generate-arange-section < %s | llvm-readobj --relocations - | FileCheck --check-prefix=OBJ %s
 
 ; extern int i;
 ; template<int *x>

Modified: llvm/trunk/test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll?rev=201378&r1=201377&r2=201378&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll Thu Feb 13 19:26:55 2014
@@ -1,4 +1,4 @@
-; RUN: llc < %s | FileCheck %s
+; RUN: llc -generate-arange-section < %s | FileCheck %s
 
 ; CHECK: .short  2 # DWARF Arange version number
 ; CHECK: # Segment Size

Modified: llvm/trunk/test/DebugInfo/X86/dwarf-aranges.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/dwarf-aranges.ll?rev=201378&r1=201377&r2=201378&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/dwarf-aranges.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/dwarf-aranges.ll Thu Feb 13 19:26:55 2014
@@ -1,4 +1,4 @@
-; RUN: llc < %s | FileCheck %s
+; RUN: llc -generate-arange-section < %s | FileCheck %s
 
 
 ; -- header --

Modified: llvm/trunk/test/DebugInfo/X86/fission-cu.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/fission-cu.ll?rev=201378&r1=201377&r2=201378&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/fission-cu.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/fission-cu.ll Thu Feb 13 19:26:55 2014
@@ -110,7 +110,5 @@
 ; OBJ-NEXT: R_X86_64_32 .debug_addr
 ; OBJ-NEXT: R_X86_64_32 .debug_str
 ; OBJ-NEXT: }
-; OBJ: .debug_aranges
-; OBJ-NEXT: R_X86_64_32 .debug_info 0x0
 
 !9 = metadata !{i32 1, metadata !"Debug Info Version", i32 1}

Modified: llvm/trunk/test/DebugInfo/X86/multiple-aranges.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/multiple-aranges.ll?rev=201378&r1=201377&r2=201378&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/multiple-aranges.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/multiple-aranges.ll Thu Feb 13 19:26:55 2014
@@ -1,4 +1,4 @@
-; RUN: llc < %s | FileCheck %s
+; RUN: llc -generate-arange-section < %s | FileCheck %s
 
 ; First CU
 ; CHECK:      .long   44                      # Length of ARange Set





More information about the llvm-commits mailing list