summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2012-03-02 00:30:24 +0000
committerEric Christopher <echristo@apple.com>2012-03-02 00:30:24 +0000
commit7524fe4551d52a760cdcbba779b3a6ea55f7a3dc (patch)
treeba8bdfb8e5737c862a67130775f321fc684b4a75
parent123edca0a9091a8c2cd71867a7d0ec24dfc038d8 (diff)
downloadbcm5719-llvm-7524fe4551d52a760cdcbba779b3a6ea55f7a3dc.tar.gz
bcm5719-llvm-7524fe4551d52a760cdcbba779b3a6ea55f7a3dc.zip
Revert "Reorder the sections being output to reduce the number of assembler"
The inline table needs to be constructed ahead of time so that it doesn't try to create new strings while we're emitting everything. This reverts commit a8ff9bccb399183cdd5f1c3cec2bda763664b4b0. llvm-svn: 151864
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp6
-rw-r--r--llvm/test/DebugInfo/X86/stringpool.ll16
2 files changed, 11 insertions, 11 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 9f1aed48902..58e40e17c52 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -804,9 +804,6 @@ void DwarfDebug::endModule() {
// Compute DIE offsets and sizes.
computeSizeAndOffsets();
- // Emit info into a debug str section.
- emitDebugStr();
-
// Emit all the DIEs into a debug info section
emitDebugInfo();
@@ -839,6 +836,9 @@ void DwarfDebug::endModule() {
// Emit inline info.
emitDebugInlineInfo();
+ // Emit info into a debug str section.
+ emitDebugStr();
+
// clean up.
DeleteContainerSeconds(DeadFnScopeMap);
SPMap.clear();
diff --git a/llvm/test/DebugInfo/X86/stringpool.ll b/llvm/test/DebugInfo/X86/stringpool.ll
index 89266a5d8f9..2cd100156aa 100644
--- a/llvm/test/DebugInfo/X86/stringpool.ll
+++ b/llvm/test/DebugInfo/X86/stringpool.ll
@@ -14,14 +14,6 @@
!6 = metadata !{i32 720937, metadata !"z.c", metadata !"/home/nicholas", null} ; [ DW_TAG_file_type ]
!7 = metadata !{i32 720932, null, metadata !"int", null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ]
-; Verify that "yyyy" ended up in the stringpool.
-; LINUX: .section .debug_str,"MS",@progbits,1
-; LINUX: yyyy
-; LINUX: .section .debug_info
-; DARWIN: .section __DWARF,__debug_str,regular,debug
-; DARWIN: yyyy
-; DARWIN: .section __DWARF,__debug_info
-
; Verify that we refer to 'yyyy' with a relocation.
; LINUX: .long .Lstring3 # DW_AT_name
; LINUX-NEXT: .long 39 # DW_AT_type
@@ -42,3 +34,11 @@
; DARWIN-NEXT: .byte 9 ## DW_AT_location
; DARWIN-NEXT: .byte 3
; DARWIN-NEXT: .quad _yyyy
+
+; Verify that "yyyy" ended up in the stringpool.
+; LINUX: .section .debug_str,"MS",@progbits,1
+; LINUX-NOT: .section
+; LINUX: yyyy
+; DARWIN: .section __DWARF,__debug_str,regular,debug
+; DARWIN-NOT: .section
+; DARWIN: yyyy
OpenPOWER on IntegriCloud