summaryrefslogtreecommitdiff
path: root/test/CodeGen/Mips
diff options
context:
space:
mode:
authorDean Michael Berris <dberris@google.com>2017-09-14 07:08:23 +0000
committerDean Michael Berris <dberris@google.com>2017-09-14 07:08:23 +0000
commitd41dbfa621cf3222d49004507d858784e6191734 (patch)
treeb9eb00f8e57163e0a7b075b70266aa21351177aa /test/CodeGen/Mips
parent679cc5075b7bf047ffcb20154cf000e50e15cb38 (diff)
[XRay][CodeGen] Use the current function symbol as the associated symbol for the instrumentation map
Summary: XRay had been assuming that the previous section is the "text" section of the function when lowering the instrumentation map. Unfortunately this is not a safe assumption, because we may be coming from lowering debug type information for the function being lowered. This fixes an issue with combining -gsplit-dwarf, -generate-type-units, -debug-compile and -fxray-instrument for sole member functions. When the split dwarf section is stripped, we're left with references from the xray_instr_map to the debug section. The change now uses the function's symbol instead of the previous section's start symbol. We found the bug while attempting to strip the split debug sections off an XRay-instrumented object file, which had a peculiar edge-case for single-function classes where the single function is being lowered. Because XRay had assocaited the instrumentation map for a function to the debug types section instead of the function's section, the objcopy call will fail due to the misplaced reference from the xray_instr_map section. Reviewers: pcc, dblaikie, echristo Subscribers: llvm-commits, aprantl Differential Revision: https://reviews.llvm.org/D37791 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313233 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Mips')
-rw-r--r--test/CodeGen/Mips/xray-section-group.ll4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/CodeGen/Mips/xray-section-group.ll b/test/CodeGen/Mips/xray-section-group.ll
index f122215c641..d295ff39e52 100644
--- a/test/CodeGen/Mips/xray-section-group.ll
+++ b/test/CodeGen/Mips/xray-section-group.ll
@@ -14,7 +14,7 @@
define i32 @foo() nounwind noinline uwtable "function-instrument"="xray-always" {
; CHECK: .section .text.foo,"ax",@progbits
ret i32 0
-; CHECK: .section xray_instr_map,"awo",@progbits,.text.foo,unique,1
+; CHECK: .section xray_instr_map,"awo",@progbits,foo,unique,1
}
; CHECK-OBJ: Section {
@@ -24,7 +24,7 @@ $bar = comdat any
define i32 @bar() nounwind noinline uwtable "function-instrument"="xray-always" comdat($bar) {
; CHECK: .section .text.bar,"axG",@progbits,bar,comdat
ret i32 1
-; CHECK: .section xray_instr_map,"aGwo",@progbits,bar,comdat,.text.bar,unique,2
+; CHECK: .section xray_instr_map,"aGwo",@progbits,bar,comdat,bar,unique,2
}
; CHECK-OBJ: Section {