1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00
llvm-mirror/test/ThinLTO/X86/mangled_symbol.ll
Steven Wu 244658bfb9 [ThinLTO][Legacy] Compute PreservedGUID based on IRName in Symtab
Instead of computing GUID based on some assumption about symbol mangling
rule from IRName to symbol name, lookup the IRName from all the symtabs
from all the input files to see if there are any matching symbols entry
provides the IRName for GUID computation.

rdar://65853754

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D84803
2020-08-26 10:15:00 -07:00

27 lines
1.1 KiB
LLVM

; RUN: opt -module-summary %s -o %t1.bc
; RUN: llvm-lto -thinlto-action=thinlink -o %t.index.bc %t1.bc
;; Check baseline when both of them internalized when not exported.
; RUN: llvm-lto -thinlto-action=internalize -thinlto-index %t.index.bc %t1.bc -o - --exported-symbol=_exported | llvm-dis -o - | FileCheck %s --check-prefix=INTERNALIZED
;; Check symbols are exported, including the ones with `\01` prefix.
; RUN: llvm-lto -thinlto-action=internalize -thinlto-index %t.index.bc %t1.bc -o - --exported-symbol=_exported --exported-symbol=_extern_not_mangled --exported-symbol=_extern_mangled | llvm-dis -o - | FileCheck %s --check-prefix=EXPORTED
; INTERNALIZED: define internal void @extern_not_mangled
; INTERNALIZED: define internal void @"\01_extern_mangled"
; EXPORTED: define void @extern_not_mangled
; EXPORTED: define void @"\01_extern_mangled"
target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.11.0"
define void @exported() {
ret void
}
define void @extern_not_mangled() {
ret void
}
define void @"\01_extern_mangled"() {
ret void
}