diff options
| author | Eric Christopher <echristo@gmail.com> | 2014-02-14 01:26:55 +0000 |
|---|---|---|
| committer | Eric Christopher <echristo@gmail.com> | 2014-02-14 01:26:55 +0000 |
| commit | 02dbadb3a0ff7ad3a690d2b104cdf96d7d972da3 (patch) | |
| tree | c23481e9fbf3334af0e43bf041a55ccd1de21c35 | |
| parent | b575878145821345483d3996b870aa790eab4d51 (diff) | |
| download | bcm5719-llvm-02dbadb3a0ff7ad3a690d2b104cdf96d7d972da3.tar.gz bcm5719-llvm-02dbadb3a0ff7ad3a690d2b104cdf96d7d972da3.zip | |
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.
llvm-svn: 201378
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 8 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/X86/arange.ll | 4 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll | 2 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/X86/dwarf-aranges.ll | 2 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/X86/fission-cu.ll | 2 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/X86/multiple-aranges.ll | 2 |
6 files changed, 12 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index d50f9d6c7d0..de2f4c6e02a 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/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<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(); diff --git a/llvm/test/DebugInfo/X86/arange.ll b/llvm/test/DebugInfo/X86/arange.ll index c797b5de797..4eea646968b 100644 --- a/llvm/test/DebugInfo/X86/arange.ll +++ b/llvm/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<int *x> diff --git a/llvm/test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll b/llvm/test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll index 29af6b215a4..021b89e1e1c 100644 --- a/llvm/test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll +++ b/llvm/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/llvm/test/DebugInfo/X86/dwarf-aranges.ll b/llvm/test/DebugInfo/X86/dwarf-aranges.ll index b44a84a85a9..f78e2172c42 100644 --- a/llvm/test/DebugInfo/X86/dwarf-aranges.ll +++ b/llvm/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/llvm/test/DebugInfo/X86/fission-cu.ll b/llvm/test/DebugInfo/X86/fission-cu.ll index 85f007d71d4..8acbced3d32 100644 --- a/llvm/test/DebugInfo/X86/fission-cu.ll +++ b/llvm/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/llvm/test/DebugInfo/X86/multiple-aranges.ll b/llvm/test/DebugInfo/X86/multiple-aranges.ll index cd317a96f31..2da29387424 100644 --- a/llvm/test/DebugInfo/X86/multiple-aranges.ll +++ b/llvm/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 |

