mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
062b5d40cb
for 32 bit signed, 32 bit unsigned, and 64 bit pointers." This reverts 57076d3199fc2b0af4a3736b7749dd5462cacda5. Original review at https://reviews.llvm.org/D64931. Review for added fix at https://reviews.llvm.org/D66843. llvm-svn: 371568
28 lines
1.0 KiB
LLVM
28 lines
1.0 KiB
LLVM
; This test makes sure a static var is not selected as a callee target
|
|
; (which will crash compilation).
|
|
; RUN: opt -module-summary %s -o %t.bc
|
|
; RUN: opt -module-summary %p/Inputs/funcimport_var2.ll -o %t2.bc
|
|
; RUN: llvm-lto -thinlto -thinlto-action=thinlink -o %t3 %t.bc %t2.bc
|
|
; RUN: llvm-lto -thinlto -thinlto-action=import -thinlto-index=%t3 %t.bc %t2.bc
|
|
; RUN: llvm-lto -thinlto -thinlto-action=run %t.bc %t2.bc -exported-symbol=_Z4LinkPKcS0_
|
|
; RUN: llvm-nm %t.bc.thinlto.o | FileCheck %s
|
|
; RUN: llvm-lto2 run %t.bc %t2.bc -o %t.out \
|
|
; RUN: -r %t.bc,_Z4LinkPKcS0_,plx \
|
|
; RUN: -r %t.bc,link,l \
|
|
; RUN: -r %t2.bc,get_link,plx
|
|
; RUN: llvm-nm %t.out.1 | FileCheck %s
|
|
; CHECK: U link
|
|
|
|
; REQUIRES: x86-registered-target
|
|
|
|
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
|
target triple = "x86_64-unknown-linux-gnu"
|
|
|
|
define i32 @_Z4LinkPKcS0_(i8*, i8*) local_unnamed_addr {
|
|
%3 = tail call i32 @link(i8* %0, i8* %1) #2
|
|
ret i32 %3
|
|
}
|
|
|
|
; Function Attrs: nounwind
|
|
declare i32 @link(i8*, i8*) local_unnamed_addr
|