brintos

brintos / llvm-project-archived public Read only

0
0
Text · 877 B · 08675d8 Raw
32 lines · plain
1; RUN: llvm-extract -func foo -S < %s | FileCheck %s2; RUN: llvm-extract -delete -func foo -S < %s | FileCheck --check-prefix=DELETE %s3; RUN: llvm-as < %s > %t4; RUN: llvm-extract -func foo -S %t | FileCheck %s5; RUN: llvm-extract -delete -func foo -S %t | FileCheck --check-prefix=DELETE %s6 7; llvm-extract uses lazy bitcode loading, so make sure it correctly reads8; from bitcode files in addition to assembly files.9 10; CHECK: define hidden void @foo() comdat($x) {11; CHECK:   ret void12; CHECK: }13 14; The private linkage for foo() should be changed to external linkage and15; hidden visibility added.16; DELETE: declare hidden void @foo()17; DELETE-NOT: comdat18; DELETE: define void @bar() {19; DELETE:   call void @foo()20; DELETE:   ret void21; DELETE: }22 23$x = comdat any24 25define private void @foo() comdat($x) {26  ret void27}28define void @bar() {29  call void @foo()30  ret void31}32