1*9880d681SAndroid Build Coastguard Worker; Check that "internalizedfn" is re-externalized prior to CodeGen when 2*9880d681SAndroid Build Coastguard Worker; setShouldRestoreGlobalsLinkage is enabled. 3*9880d681SAndroid Build Coastguard Worker; 4*9880d681SAndroid Build Coastguard Worker; RUN: llvm-as < %s > %t1 5*9880d681SAndroid Build Coastguard Worker; RUN: llvm-lto -exported-symbol=preservedfn -restore-linkage -filetype=asm -o - %t1 | FileCheck %s 6*9880d681SAndroid Build Coastguard Worker; 7*9880d681SAndroid Build Coastguard Worker; CHECK: .globl internalizedfn 8*9880d681SAndroid Build Coastguard Worker 9*9880d681SAndroid Build Coastguard Workertarget triple = "x86_64-unknown-linux-gnu" 10*9880d681SAndroid Build Coastguard Worker 11*9880d681SAndroid Build Coastguard Workerdeclare void @f() 12*9880d681SAndroid Build Coastguard Worker 13*9880d681SAndroid Build Coastguard Workerdefine void @internalizedfn() noinline { 14*9880d681SAndroid Build Coastguard Workerentry: 15*9880d681SAndroid Build Coastguard Worker call void @f() 16*9880d681SAndroid Build Coastguard Worker ret void 17*9880d681SAndroid Build Coastguard Worker} 18*9880d681SAndroid Build Coastguard Worker 19*9880d681SAndroid Build Coastguard Workerdefine void @preservedfn() { 20*9880d681SAndroid Build Coastguard Workerentry: 21*9880d681SAndroid Build Coastguard Worker call void @internalizedfn() 22*9880d681SAndroid Build Coastguard Worker ret void 23*9880d681SAndroid Build Coastguard Worker} 24*9880d681SAndroid Build Coastguard Worker 25