diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -4033,7 +4033,7 @@ // per-function, we are able to create an index entry that will represent the // range of sleds associated with a function. auto &Ctx = OutContext; - MCSymbol *SledsStart = OutContext.createTempSymbol("xray_sleds_start", true); + MCSymbol *SledsStart = OutContext.createLinkerPrivateSymbol("xray_sleds_start"); OutStreamer->switchSection(InstMap); OutStreamer->emitLabel(SledsStart); for (const auto &Sled : Sleds) { diff --git a/llvm/test/CodeGen/AArch64/xray-attribute-instrumentation.ll b/llvm/test/CodeGen/AArch64/xray-attribute-instrumentation.ll --- a/llvm/test/CodeGen/AArch64/xray-attribute-instrumentation.ll +++ b/llvm/test/CodeGen/AArch64/xray-attribute-instrumentation.ll @@ -22,7 +22,7 @@ ; CHECK-LINUX-LABEL: Lxray_sleds_end0: ; CHECK-MACOS-LABEL: .section __DATA,xray_instr_map,regular,live_support{{$}} -; CHECK-MACOS-LABEL: Lxray_sleds_start0: +; CHECK-MACOS-LABEL: lxray_sleds_start0: ; CHECK-MACOS: .quad Lxray_sled_0 ; CHECK-MACOS: .quad Lxray_sled_1 ; CHECK-MACOS-LABEL: Lxray_sleds_end0: @@ -48,7 +48,7 @@ ; CHECK-LINUX-LABEL: Lxray_sleds_end1: ; CHECK-MACOS-LABEL: .section __DATA,xray_instr_map,regular,live_support{{$}} -; CHECK-MACOS-LABEL: Lxray_sleds_start1: +; CHECK-MACOS-LABEL: lxray_sleds_start1: ; CHECK-MACOS: .quad Lxray_sled_2 ; CHECK-MACOS: .quad Lxray_sled_3 ; CHECK-MACOS-LABEL: Lxray_sleds_end1: @@ -74,7 +74,7 @@ ; CHECK-LINUX-LABEL: Lxray_sleds_end2: ; CHECK-MACOS-LABEL: .section __DATA,xray_instr_map,regular,live_support{{$}} -; CHECK-MACOS-LABEL: Lxray_sleds_start2: +; CHECK-MACOS-LABEL: lxray_sleds_start2: ; CHECK-MACOS: .quad Lxray_sled_4 ; CHECK-MACOS: .quad Lxray_sled_5 ; CHECK-MACOS-LABEL: Lxray_sleds_end2: diff --git a/llvm/test/CodeGen/AArch64/xray-omit-function-index.ll b/llvm/test/CodeGen/AArch64/xray-omit-function-index.ll --- a/llvm/test/CodeGen/AArch64/xray-omit-function-index.ll +++ b/llvm/test/CodeGen/AArch64/xray-omit-function-index.ll @@ -32,7 +32,7 @@ ; CHECK-LINUX-LABEL: Lxray_sleds_end0: ; CHECK-MACOS-LABEL: .section __DATA,xray_instr_map,regular,live_support{{$}} -; CHECK-MACOS-LABEL: Lxray_sleds_start0: +; CHECK-MACOS-LABEL: lxray_sleds_start0: ; CHECK-MACOS: .quad Lxray_sled_0 ; CHECK-MACOS: .quad Lxray_sled_1 ; CHECK-MACOS-LABEL: Lxray_sleds_end0: diff --git a/llvm/test/CodeGen/AArch64/xray-partial-instrumentation-skip-entry.ll b/llvm/test/CodeGen/AArch64/xray-partial-instrumentation-skip-entry.ll --- a/llvm/test/CodeGen/AArch64/xray-partial-instrumentation-skip-entry.ll +++ b/llvm/test/CodeGen/AArch64/xray-partial-instrumentation-skip-entry.ll @@ -23,6 +23,6 @@ ; CHECK-LINUX-LABEL: Lxray_sleds_end0: ; CHECK-MACOS-LABEL: .section __DATA,xray_instr_map,regular,live_support{{$}} -; CHECK-MACOS-LABEL: Lxray_sleds_start0: +; CHECK-MACOS-LABEL: lxray_sleds_start0: ; CHECK-MACOS: .quad Lxray_sled_0 ; CHECK-MACOS-LABEL: Lxray_sleds_end0: diff --git a/llvm/test/CodeGen/AArch64/xray-partial-instrumentation-skip-exit.ll b/llvm/test/CodeGen/AArch64/xray-partial-instrumentation-skip-exit.ll --- a/llvm/test/CodeGen/AArch64/xray-partial-instrumentation-skip-exit.ll +++ b/llvm/test/CodeGen/AArch64/xray-partial-instrumentation-skip-exit.ll @@ -23,6 +23,6 @@ ; CHECK-LINUX-LABEL: Lxray_sleds_end0: ; CHECK-MACOS-LABEL: .section __DATA,xray_instr_map,regular,live_support{{$}} -; CHECK-MACOS-LABEL: Lxray_sleds_start0: +; CHECK-MACOS-LABEL: lxray_sleds_start0: ; CHECK-MACOS: .quad Lxray_sled_0 ; CHECK-MACOS-LABEL: Lxray_sleds_end0: diff --git a/llvm/test/CodeGen/AArch64/xray-tail-call-sled.ll b/llvm/test/CodeGen/AArch64/xray-tail-call-sled.ll --- a/llvm/test/CodeGen/AArch64/xray-tail-call-sled.ll +++ b/llvm/test/CodeGen/AArch64/xray-tail-call-sled.ll @@ -29,7 +29,7 @@ ; CHECK-LINUX-NEXT: .xword 2 ; CHECK-MACOS-LABEL: .section __DATA,xray_instr_map,regular,live_support{{$}} -; CHECK-MACOS-LABEL: Lxray_sleds_start0: +; CHECK-MACOS-LABEL: lxray_sleds_start0: ; CHECK-MACOS-NEXT: [[TMP:Ltmp[0-9]+]]: ; CHECK-MACOS: .quad Lxray_sled_0-[[TMP]] ; CHECK-MACOS: [[TMP:Ltmp[0-9]+]]: @@ -37,7 +37,7 @@ ; CHECK-MACOS-LABEL: Lxray_sleds_end0: ; CHECK-MACOS-LABEL: .section __DATA,xray_fn_idx,regular,live_support{{$}} ; CHECK-MACOS: [[IDX:lxray_fn_idx[0-9]+]]: -; CHECK-MACOS-NEXT: .quad Lxray_sleds_start0-[[IDX]] +; CHECK-MACOS-NEXT: .quad lxray_sleds_start0-[[IDX]] ; CHECK-MACOS-NEXT: .quad 2 define i32 @caller() nounwind noinline uwtable "function-instrument"="xray-always" { @@ -68,11 +68,11 @@ ; CHECK-LINUX-NEXT: .xword 2 ; CHECK-MACOS-LABEL: .section __DATA,xray_instr_map,regular,live_support{{$}} -; CHECK-MACOS-LABEL: Lxray_sleds_start1: +; CHECK-MACOS-LABEL: lxray_sleds_start1: ; CHECK-MACOS: .quad Lxray_sled_2 ; CHECK-MACOS: .quad Lxray_sled_3 ; CHECK-MACOS-LABEL: Lxray_sleds_end1: ; CHECK-MACOS-LABEL: .section __DATA,xray_fn_idx,regular,live_support{{$}} ; CHECK-MACOS: [[IDX:lxray_fn_idx[0-9]+]]: -; CHECK-MACOS-NEXT: .quad Lxray_sleds_start1-[[IDX]] +; CHECK-MACOS-NEXT: .quad lxray_sleds_start1-[[IDX]] ; CHECK-MACOS-NEXT: .quad 2 diff --git a/llvm/test/CodeGen/ARM/xray-armv6-attribute-instrumentation.ll b/llvm/test/CodeGen/ARM/xray-armv6-attribute-instrumentation.ll --- a/llvm/test/CodeGen/ARM/xray-armv6-attribute-instrumentation.ll +++ b/llvm/test/CodeGen/ARM/xray-armv6-attribute-instrumentation.ll @@ -34,10 +34,10 @@ ; CHECK-LINUX-NEXT: .long 2 ; CHECK-IOS-LABEL: .section __DATA,xray_instr_map,regular,live_support{{$}} -; CHECK-IOS-LABEL: Lxray_sleds_start0: +; CHECK-IOS-LABEL: lxray_sleds_start0: ; CHECK-IOS: .long Lxray_sled_0 ; CHECK-IOS: .long Lxray_sled_1 ; CHECK-IOS-LABEL: Lxray_sleds_end0: ; CHECK-IOS-LABEL: .section __DATA,xray_fn_idx,regular,live_support{{$}} -; CHECK-IOS: .long Lxray_sleds_start0-lxray_fn_idx0 +; CHECK-IOS: .long lxray_sleds_start0-lxray_fn_idx0 ; CHECK-IOS-NEXT: .long 2 diff --git a/llvm/test/CodeGen/ARM/xray-armv7-attribute-instrumentation.ll b/llvm/test/CodeGen/ARM/xray-armv7-attribute-instrumentation.ll --- a/llvm/test/CodeGen/ARM/xray-armv7-attribute-instrumentation.ll +++ b/llvm/test/CodeGen/ARM/xray-armv7-attribute-instrumentation.ll @@ -25,11 +25,11 @@ ; CHECK-LINUX-NEXT: .long 2 ; CHECK-IOS-LABEL: .section __DATA,xray_instr_map,regular,live_support{{$}} -; CHECK-IOS-LABEL: Lxray_sleds_start0: +; CHECK-IOS-LABEL: lxray_sleds_start0: ; CHECK-IOS: .long Lxray_sled_0 ; CHECK-IOS: .long Lxray_sled_1 ; CHECK-IOS-LABEL: Lxray_sleds_end0: ; CHECK-IOS-LABEL: .section __DATA,xray_fn_idx,regular,live_support{{$}} ; CHECK-IOS: lxray_fn_idx0: -; CHECK-IOS: .long Lxray_sleds_start0-lxray_fn_idx0 +; CHECK-IOS: .long lxray_sleds_start0-lxray_fn_idx0 ; CHECK-IOS-NEXT: .long 2 diff --git a/llvm/test/CodeGen/X86/xray-attribute-instrumentation.ll b/llvm/test/CodeGen/X86/xray-attribute-instrumentation.ll --- a/llvm/test/CodeGen/X86/xray-attribute-instrumentation.ll +++ b/llvm/test/CodeGen/X86/xray-attribute-instrumentation.ll @@ -25,13 +25,13 @@ ; CHECK-LINUX-NEXT: .quad 2 ; CHECK-MACOS-LABEL: .section __DATA,xray_instr_map,regular,live_support{{$}} -; CHECK-MACOS-LABEL: Lxray_sleds_start0: +; CHECK-MACOS-LABEL: lxray_sleds_start0: ; CHECK-MACOS: .quad Lxray_sled_0 ; CHECK-MACOS: .quad Lxray_sled_1 ; CHECK-MACOS-LABEL: Lxray_sleds_end0: ; CHECK-MACOS-LABEL: .section __DATA,xray_fn_idx,regular,live_support{{$}} ; CHECK-MACOS: [[IDX:lxray_fn_idx[0-9]+]]: -; CHECK-MACOS-NEXT: .quad Lxray_sleds_start0-[[IDX]] +; CHECK-MACOS-NEXT: .quad lxray_sleds_start0-[[IDX]] ; CHECK-MACOS-NEXT: .quad 2 @@ -74,7 +74,7 @@ ; CHECK-LINUX-NEXT: .quad 3 ; CHECK-MACOS-LABEL: .section __DATA,xray_instr_map,regular,live_support{{$}} -; CHECK-MACOS-LABEL: Lxray_sleds_start1: +; CHECK-MACOS-LABEL: lxray_sleds_start1: ; CHECK-MACOS: [[TMP:Ltmp[0-9]+]]: ; CHECK-MACOS-NEXT: .quad Lxray_sled_2-[[TMP]] ; CHECK-MACOS: [[TMP:Ltmp[0-9]+]]: @@ -84,5 +84,5 @@ ; CHECK-MACOS-LABEL: Lxray_sleds_end1: ; CHECK-MACOS-LABEL: .section __DATA,xray_fn_idx,regular,live_support{{$}} ; CHECK-MACOS: [[IDX:lxray_fn_idx[0-9]+]]: -; CHECK-MACOS-NEXT: .quad Lxray_sleds_start1-[[IDX]] +; CHECK-MACOS-NEXT: .quad lxray_sleds_start1-[[IDX]] ; CHECK-MACOS-NEXT: .quad 3 diff --git a/llvm/test/CodeGen/X86/xray-log-args.ll b/llvm/test/CodeGen/X86/xray-log-args.ll --- a/llvm/test/CodeGen/X86/xray-log-args.ll +++ b/llvm/test/CodeGen/X86/xray-log-args.ll @@ -25,7 +25,7 @@ ; CHECK-LINUX-NEXT: .byte 0x02 ; CHECK-LINUX: .zero 13 -; CHECK-MACOS-LABEL: Lxray_sleds_start0: +; CHECK-MACOS-LABEL: lxray_sleds_start0: ; CHECK-MACOS-NEXT: [[TMP:Ltmp[0-9]+]]: ; CHECK-MACOS-NEXT: .quad Lxray_sled_0-[[TMP]] ; CHECK-MACOS-NEXT: .quad Lfunc_begin0-([[TMP]]+8) @@ -62,7 +62,7 @@ ; CHECK-LINUX-NEXT: .byte 0x02 ; CHECK-LINUX: .zero 13 -; CHECK-MACOS-LABEL: Lxray_sleds_start1: +; CHECK-MACOS-LABEL: lxray_sleds_start1: ; CHECK-MACOS-NEXT: [[TMP:Ltmp[0-9]+]]: ; CHECK-MACOS-NEXT: .quad Lxray_sled_2-[[TMP]] ; CHECK-MACOS-NEXT: .quad Lfunc_begin1-([[TMP]]+8) diff --git a/llvm/test/CodeGen/X86/xray-partial-instrumentation-skip-entry.ll b/llvm/test/CodeGen/X86/xray-partial-instrumentation-skip-entry.ll --- a/llvm/test/CodeGen/X86/xray-partial-instrumentation-skip-entry.ll +++ b/llvm/test/CodeGen/X86/xray-partial-instrumentation-skip-entry.ll @@ -21,12 +21,12 @@ ; CHECK-LINUX-NEXT: .quad 1 ; CHECK-MACOS-LABEL: .section __DATA,xray_instr_map,regular,live_support{{$}} -; CHECK-MACOS-LABEL: Lxray_sleds_start0: +; CHECK-MACOS-LABEL: lxray_sleds_start0: ; CHECK-MACOS: .quad Lxray_sled_0 ; CHECK-MACOS-LABEL: Lxray_sleds_end0: ; CHECK-MACOS-LABEL: .section __DATA,xray_fn_idx,regular,live_support{{$}} ; CHECK-MACOS: [[IDX:lxray_fn_idx[0-9]+]]: -; CHECK-MACOS-NEXT: .quad Lxray_sleds_start0-[[IDX]] +; CHECK-MACOS-NEXT: .quad lxray_sleds_start0-[[IDX]] ; CHECK-MACOS-NEXT: .quad 1 @@ -62,11 +62,11 @@ ; CHECK-LINUX-NEXT: .quad 2 ; CHECK-MACOS-LABEL: .section __DATA,xray_instr_map,regular,live_support{{$}} -; CHECK-MACOS-LABEL: Lxray_sleds_start1: +; CHECK-MACOS-LABEL: lxray_sleds_start1: ; CHECK-MACOS: .quad Lxray_sled_1 ; CHECK-MACOS: .quad Lxray_sled_2 ; CHECK-MACOS-LABEL: Lxray_sleds_end1: ; CHECK-MACOS-LABEL: .section __DATA,xray_fn_idx,regular,live_support{{$}} ; CHECK-MACOS: [[IDX:lxray_fn_idx[0-9]+]]: -; CHECK-MACOS-NEXT: .quad Lxray_sleds_start1-[[IDX]] +; CHECK-MACOS-NEXT: .quad lxray_sleds_start1-[[IDX]] ; CHECK-MACOS-NEXT: .quad 2 diff --git a/llvm/test/CodeGen/X86/xray-partial-instrumentation-skip-exit.ll b/llvm/test/CodeGen/X86/xray-partial-instrumentation-skip-exit.ll --- a/llvm/test/CodeGen/X86/xray-partial-instrumentation-skip-exit.ll +++ b/llvm/test/CodeGen/X86/xray-partial-instrumentation-skip-exit.ll @@ -18,15 +18,17 @@ ; CHECK-LINUX: .quad .Lxray_sled_0 ; CHECK-LINUX-LABEL: .Lxray_sleds_end0: ; CHECK-LINUX-LABEL: .section xray_fn_idx,"awo",@progbits,foo{{$}} -; CHECK-LINUX: .quad .Lxray_sleds_start0 +; CHECK-LINUX: [[IDX:.lxray_fn_idx[0-9]+]]: +; CHECK-LINUX: .quad .Lxray_sleds_start0-[[IDX]] ; CHECK-LINUX-NEXT: .quad .Lxray_sleds_end0 ; CHECK-MACOS-LABEL: .section __DATA,xray_instr_map,regular,live_support{{$}} -; CHECK-MACOS-LABEL: Lxray_sleds_start0: +; CHECK-MACOS-LABEL: lxray_sleds_start0: ; CHECK-MACOS: .quad Lxray_sled_0 ; CHECK-MACOS-LABEL: Lxray_sleds_end0: ; CHECK-MACOS-LABEL: .section __DATA,xray_fn_idx,regular,live_support{{$}} -; CHECK-MACOS: .quad Lxray_sleds_start0 +; CHECK-MACOS: [[IDX:lxray_fn_idx[0-9]+]]: +; CHECK-MACOS: .quad lxray_sleds_start0-[[IDX]] ; CHECK-MACOS-NEXT: .quad Lxray_sleds_end0 @@ -57,13 +59,13 @@ ; CHECK-LINUX-LABEL: .section xray_fn_idx,"awo",@progbits,bar{[$}} ; CHECK-LINUX: .Lxray_fn_idx0: ; CHECK-LINUX-NEXT: .quad .Lxray_sleds_start1-.Lxray_fn_idx0 -; CHECK-LINUX-NEXT: .quad .Lxray_sleds_end1 +; CHECK-LINUX-NEXT: .quad 2 ; CHECK-MACOS-LABEL: .section __DATA,xray_instr_map,regular,live_support{{$}} -; CHECK-MACOS-LABEL: Lxray_sleds_start1: +; CHECK-MACOS-LABEL: lxray_sleds_start1: ; CHECK-MACOS: .quad Lxray_sled_1 ; CHECK-MACOS-LABEL: Lxray_sleds_end1: ; CHECK-MACOS-LABEL: .section __DATA,xray_fn_idx,regular,live_support{{$}} ; CHECK-MACOS: Lxray_fn_idx0: ; CHECK-MACOS-NEXT: .quad Lxray_sleds_start1-Lxray_fn_idx0 -; CHECK-MACOS-NEXT: .quad Lxray_sleds_end1 +; CHECK-MACOS-NEXT: .quad 2 diff --git a/llvm/test/CodeGen/X86/xray-tail-call-sled.ll b/llvm/test/CodeGen/X86/xray-tail-call-sled.ll --- a/llvm/test/CodeGen/X86/xray-tail-call-sled.ll +++ b/llvm/test/CodeGen/X86/xray-tail-call-sled.ll @@ -24,13 +24,13 @@ ; CHECK-LINUX-NEXT: .quad 2 ; CHECK-MACOS-LABEL: .section __DATA,xray_instr_map,regular,live_support{{$}} -; CHECK-MACOS-LABEL: Lxray_sleds_start0: +; CHECK-MACOS-LABEL: lxray_sleds_start0: ; CHECK-MACOS: .quad Lxray_sled_0 ; CHECK-MACOS: .quad Lxray_sled_1 ; CHECK-MACOS-LABEL: Lxray_sleds_end0: ; CHECK-MACOS-LABEL: .section __DATA,xray_fn_idx,regular,live_support{{$}} ; CHECK-MACOS: [[IDX:lxray_fn_idx[0-9]+]]: -; CHECK-MACOS-NEXT: .quad Lxray_sleds_start0-[[IDX]] +; CHECK-MACOS-NEXT: .quad lxray_sleds_start0-[[IDX]] ; CHECK-MACOS-NEXT: .quad 2 define dso_local i32 @caller() nounwind noinline uwtable "function-instrument"="xray-always" { @@ -58,11 +58,11 @@ ; CHECK-LINUX-NEXT: .quad 2 ; CHECK-MACOS-LABEL: .section __DATA,xray_instr_map,regular,live_support{{$}} -; CHECK-MACOS-LABEL: Lxray_sleds_start1: +; CHECK-MACOS-LABEL: lxray_sleds_start1: ; CHECK-MACOS: .quad Lxray_sled_2 ; CHECK-MACOS: .quad Lxray_sled_3 ; CHECK-MACOS-LABEL: Lxray_sleds_end1: ; CHECK-MACOS-LABEL: .section __DATA,xray_fn_idx,regular,live_support{{$}} ; CHECK-MACOS: [[IDX:lxray_fn_idx[0-9]+]]: -; CHECK-MACOS-NEXT: .quad Lxray_sleds_start1-[[IDX]] +; CHECK-MACOS-NEXT: .quad lxray_sleds_start1-[[IDX]] ; CHECK-MACOS-NEXT: .quad 2