1; REQUIRES: x86
2; RUN: llvm-as %s -o %t.o
3; RUN: echo "{ global: foo; local: *; };" > %t.script
4; RUN: ld.lld -m elf_x86_64 %t.o -o %t2 -shared --version-script %t.script -save-temps
5; RUN: llvm-dis < %t2.0.2.internalize.bc | FileCheck %s
6
7target triple = "x86_64-unknown-linux-gnu"
8target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
9
10define void @foo() {
11  ret void
12}
13
14define void @bar() {
15  ret void
16}
17
18; Check that foo is not internalized.
19; CHECK: define void @foo()
20
21; Check that bar is correctly internalized.
22; CHECK: define internal void @bar()
23