1;; RUN: llc -verify-machineinstrs \ 2;; RUN: -mtriple=armv7-linux-gnueabi -filetype=obj %s -o - | \ 3;; RUN: llvm-readobj --symbols - | FileCheck -check-prefix=ARM %s 4 5;; RUN: llc -verify-machineinstrs \ 6;; RUN: -mtriple=thumbv7-linux-gnueabi -filetype=obj %s -o - | \ 7;; RUN: llvm-readobj --symbols - | FileCheck -check-prefix=TMB %s 8 9;; Ensure that if a jump table is generated that it has Mapping Symbols 10;; marking the data-in-code region. 11 12define void @foo(i32* %ptr, i32 %b) nounwind ssp { 13 %tmp = load i32, i32* %ptr, align 4 14 switch i32 %tmp, label %exit [ 15 i32 0, label %bb0 16 i32 1, label %bb1 17 i32 2, label %bb2 18 i32 3, label %bb3 19 ] 20bb0: 21 store i32 %b, i32* %ptr, align 4 22 br label %exit 23bb1: 24 store i32 1, i32* %ptr, align 4 25 br label %exit 26bb2: 27 store i32 2, i32* %ptr, align 4 28 br label %exit 29bb3: 30 store i32 4, i32* %ptr, align 4 31 br label %exit 32exit: 33 ret void 34} 35 36;; ARM: Symbol { 37;; ARM: Name: $a 38;; ARM-NEXT: Value: 0x0 39;; ARM-NEXT: Size: 0 40;; ARM-NEXT: Binding: Local 41;; ARM-NEXT: Type: None 42;; ARM-NEXT: Other: 43;; ARM-NEXT: Section: [[MIXED_SECT:[^ ]+]] 44 45;; ARM: Symbol { 46;; ARM: Name: $a 47;; ARM-NEXT: Value: 0x{{[0-9A-F]+}} 48;; ARM-NEXT: Size: 0 49;; ARM-NEXT: Binding: Local 50;; ARM-NEXT: Type: None 51;; ARM-NEXT: Other: 52;; ARM-NEXT: Section: [[MIXED_SECT]] 53 54;; ARM: Symbol { 55;; ARM: Name: $d 56;; ARM-NEXT: Value: 0x{{[0-9A-F]+}} 57;; ARM-NEXT: Size: 0 58;; ARM-NEXT: Binding: Local 59;; ARM-NEXT: Type: None 60;; ARM-NEXT: Other: 61;; ARM-NEXT: Section: [[MIXED_SECT]] 62 63;; ARM-NOT: ${{[atd]}} 64 65;; TMB: Symbol { 66;; TMB: Name: $d.1 67;; TMB-NEXT: Value: 0x{{[0-9A-F]+}} 68;; TMB-NEXT: Size: 0 69;; TMB-NEXT: Binding: Local 70;; TMB-NEXT: Type: None 71;; TMB-NEXT: Other: 72;; TMB-NEXT: Section: [[MIXED_SECT:[^ ]+]] 73 74;; TMB: Symbol { 75;; TMB: Name: $t 76;; TMB-NEXT: Value: 0x0 77;; TMB-NEXT: Size: 0 78;; TMB-NEXT: Binding: Local 79;; TMB-NEXT: Type: None 80;; TMB-NEXT: Other: 81;; TMB-NEXT: Section: [[MIXED_SECT]] 82 83;; TMB: Symbol { 84;; TMB: Name: $t 85;; TMB-NEXT: Value: 0x{{[0-9A-F]+}} 86;; TMB-NEXT: Size: 0 87;; TMB-NEXT: Binding: Local 88;; TMB-NEXT: Type: None 89;; TMB-NEXT: Other: 90;; TMB-NEXT: Section: [[MIXED_SECT]] 91 92 93;; TMB-NOT: ${{[atd]}} 94 95