~pali/+junk/llvm-toolchain-3.7

« back to all changes in this revision

Viewing changes to test/Other/extract-weak-odr.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2015-07-15 17:51:08 UTC
  • Revision ID: package-import@ubuntu.com-20150715175108-l8mynwovkx4zx697
Tags: upstream-3.7~+rc2
ImportĀ upstreamĀ versionĀ 3.7~+rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; RUN: llvm-extract -func foo -S < %s | FileCheck %s
 
2
; RUN: llvm-extract -delete -func foo -S < %s | FileCheck --check-prefix=DELETE %s
 
3
 
 
4
; Test that we don't convert weak_odr to external definitions.
 
5
 
 
6
; CHECK:      @bar = external global i32
 
7
; CHECK:      define weak_odr i32* @foo() {
 
8
; CHECK-NEXT:  ret i32* @bar
 
9
; CHECK-NEXT: }
 
10
 
 
11
; DELETE: @bar = weak_odr global i32 42
 
12
; DELETE: declare i32* @foo()
 
13
 
 
14
@bar = weak_odr global i32 42
 
15
 
 
16
define weak_odr i32*  @foo() {
 
17
  ret i32* @bar
 
18
}
 
19
 
 
20
define void @g() {
 
21
  %c = call i32* @foo()
 
22
  ret void
 
23
}