Files
clang-p2996/llvm/test/CodeGen/X86/semantic-interposition-comdat.ll
Fangrui Song 872c5fb143 [AsmPrinter] Don't generate .Lfoo$local for -fno-PIC and -fPIE
-fno-PIC and -fPIE code generally cannot be linked in -shared mode and there is no benefit accessing via local aliases.

Actually, a .Lfoo$local reference will be converted to a STT_SECTION (if no section relaxation) reference which will cause the section symbol (sizeof(Elf64_Sym)=24) to be generated.
2020-05-25 23:35:49 -07:00

29 lines
495 B
LLVM

; RUN: llc -mtriple=x86_64 -relocation-model=pic < %s | FileCheck %s
$comdat_func = comdat any
; CHECK-LABEL: func2:
; CHECK-NEXT: .Lfunc2$local
declare void @func()
define hidden void @func2() {
entry:
call void @func()
ret void
}
; CHECK: comdat_func:
; CHECK-NOT: .Lcomdat_func$local
define hidden void @comdat_func() comdat {
entry:
call void @func()
ret void
}
!llvm.module.flags = !{!0, !1}
!0 = !{i32 1, !"SemanticInterposition", i32 0}
!1 = !{i32 7, !"PIC Level", i32 2}