2010-09-23 02:33:13 +02:00
|
|
|
; RUN: llvm-extract -func foo -S < %s | FileCheck %s
|
|
|
|
; RUN: llvm-extract -delete -func foo -S < %s | FileCheck --check-prefix=DELETE %s
|
|
|
|
; RUN: llvm-as < %s > %t
|
|
|
|
; RUN: llvm-extract -func foo -S %t | FileCheck %s
|
|
|
|
; RUN: llvm-extract -delete -func foo -S %t | FileCheck --check-prefix=DELETE %s
|
|
|
|
|
|
|
|
; llvm-extract uses lazy bitcode loading, so make sure it correctly reads
|
|
|
|
; from bitcode files in addition to assembly files.
|
|
|
|
|
2012-10-29 02:59:03 +01:00
|
|
|
; CHECK: define hidden void @foo() {
|
2010-09-23 02:33:13 +02:00
|
|
|
; CHECK: ret void
|
|
|
|
; CHECK: }
|
2010-09-23 19:25:06 +02:00
|
|
|
|
2012-10-29 02:59:03 +01:00
|
|
|
; The private linkage for foo() should be changed to external linkage and
|
|
|
|
; hidden visibility added.
|
|
|
|
; DELETE: declare hidden void @foo()
|
2010-09-23 02:33:13 +02:00
|
|
|
; DELETE: define void @bar() {
|
2010-09-23 19:25:06 +02:00
|
|
|
; DELETE: call void @foo()
|
2010-09-23 02:33:13 +02:00
|
|
|
; DELETE: ret void
|
|
|
|
; DELETE: }
|
|
|
|
|
2012-10-29 02:59:03 +01:00
|
|
|
define private void @foo() {
|
2010-09-23 02:33:13 +02:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @bar() {
|
2010-09-23 19:25:06 +02:00
|
|
|
call void @foo()
|
2010-09-23 02:33:13 +02:00
|
|
|
ret void
|
|
|
|
}
|