mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-03-04 18:38:37 +00:00

Now that we have a way to mark GlobalValues as local we can use the symbol resolutions that the linker plugin provides as part of lto/thinlto link step to refine the compilers view on what symbols will end up being local. Originally commited as r317374, but reverted in r317395 to update some missed tests. Differential Revision: https://reviews.llvm.org/D35702 llvm-svn: 317408
13 lines
454 B
LLVM
13 lines
454 B
LLVM
; RUN: llvm-as -o %t1.bc %s
|
|
; RUN: llvm-as -o %t2.bc %p/Inputs/commons.ll
|
|
; RUN: llvm-lto2 run %t1.bc -r=%t1.bc,x,l %t2.bc -r=%t2.bc,x,pl -o %t.out -save-temps
|
|
; RUN: llvm-dis -o - %t.out.0.0.preopt.bc | FileCheck %s
|
|
|
|
; A strong definition should override the common
|
|
; CHECK: @x = dso_local global i32 42, align 4
|
|
|
|
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
|
target triple = "x86_64-unknown-linux-gnu"
|
|
|
|
@x = common global i16 0, align 2
|