OLD | NEW |
(Empty) | |
| 1 ; Tests that we name unnamed global addresses. |
| 2 |
| 3 ; RUN: llvm-as < %s | pnacl-freeze \ |
| 4 ; RUN: | %llvm2ice -notranslate -verbose=inst -build-on-read \ |
| 5 ; RUN: -allow-pnacl-reader-error-recovery \ |
| 6 ; RUN: | FileCheck %s |
| 7 |
| 8 ; RUN: llvm-as < %s | pnacl-freeze \ |
| 9 ; RUN: | %llvm2ice -notranslate -verbose=inst -build-on-read \ |
| 10 ; RUN: -default-function-prefix=h -default-global-prefix=g \ |
| 11 ; RUN: -allow-pnacl-reader-error-recovery \ |
| 12 ; RUN: | FileCheck --check-prefix=BAD %s |
| 13 |
| 14 ; TODO(kschimpf) Check global variable declarations, once generated. |
| 15 |
| 16 @0 = internal global [4 x i8] zeroinitializer, align 4 |
| 17 @1 = internal constant [10 x i8] c"Some stuff", align 1 |
| 18 @g = internal global [4 x i8] zeroinitializer, align 4 |
| 19 |
| 20 ; BAD: Warning: Default global prefix 'g' conflicts with name 'g'. |
| 21 |
| 22 define i32 @2(i32 %v) { |
| 23 ret i32 %v |
| 24 } |
| 25 |
| 26 ; CHECK: define i32 @Function(i32 %__0) { |
| 27 ; CHECK-NEXT: __0: |
| 28 ; CHECK-NEXT: ret i32 %__0 |
| 29 ; CHECK-NEXT: } |
| 30 |
| 31 define void @hg() { |
| 32 ret void |
| 33 } |
| 34 |
| 35 ; BAD: Warning: Default function prefix 'h' conflicts with name 'hg'. |
| 36 |
| 37 ; CHECK-NEXT: define void @hg() { |
| 38 ; CHECK-NEXT: __0: |
| 39 ; CHECK-NEXT: ret void |
| 40 ; CHECK-NEXT: } |
| 41 |
| 42 define void @3() { |
| 43 ret void |
| 44 } |
| 45 |
| 46 ; CHECK-NEXT: define void @Function1() { |
| 47 ; CHECK-NEXT: __0: |
| 48 ; CHECK-NEXT: ret void |
| 49 ; CHECK-NEXT: } |
OLD | NEW |