From: Eric Christopher Date: Fri, 14 Feb 2014 01:26:55 +0000 (+0000) Subject: Disable emission of aranges by default and add a command line X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=5483012b4d4aef505272f1a310e5620a706a7b84;p=oota-llvm.git 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201378 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index d50f9d6c7d0..de2f4c6e02a 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -67,6 +67,11 @@ GenerateGnuPubSections("generate-gnu-dwarf-pub-sections", cl::Hidden, cl::desc("Generate GNU-style pubnames and pubtypes"), cl::init(false)); +static cl::opt 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(); diff --git a/test/DebugInfo/X86/arange.ll b/test/DebugInfo/X86/arange.ll index c797b5de797..4eea646968b 100644 --- a/test/DebugInfo/X86/arange.ll +++ b/test/DebugInfo/X86/arange.ll @@ -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 diff --git a/test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll b/test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll index 29af6b215a4..021b89e1e1c 100644 --- a/test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll +++ b/test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll @@ -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 diff --git a/test/DebugInfo/X86/dwarf-aranges.ll b/test/DebugInfo/X86/dwarf-aranges.ll index b44a84a85a9..f78e2172c42 100644 --- a/test/DebugInfo/X86/dwarf-aranges.ll +++ b/test/DebugInfo/X86/dwarf-aranges.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s | FileCheck %s +; RUN: llc -generate-arange-section < %s | FileCheck %s ; -- header -- diff --git a/test/DebugInfo/X86/fission-cu.ll b/test/DebugInfo/X86/fission-cu.ll index 85f007d71d4..8acbced3d32 100644 --- a/test/DebugInfo/X86/fission-cu.ll +++ b/test/DebugInfo/X86/fission-cu.ll @@ -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} diff --git a/test/DebugInfo/X86/multiple-aranges.ll b/test/DebugInfo/X86/multiple-aranges.ll index cd317a96f31..2da29387424 100644 --- a/test/DebugInfo/X86/multiple-aranges.ll +++ b/test/DebugInfo/X86/multiple-aranges.ll @@ -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