1 ; REQUIRES: arm-registered-target
2 ; REQUIRES: aarch64-registered-target
4 ; RUN: %clang_cc1 -triple thumbv7-apple-ios8.0.0 -emit-llvm \
5 ; RUN: -fembed-bitcode=all -x ir %s -o - \
7 ; RUN: %clang_cc1 -triple thumbv7-apple-ios8.0.0 -emit-llvm \
8 ; RUN: -fembed-bitcode=marker -x ir %s -o - \
9 ; RUN: | FileCheck %s -check-prefix=CHECK-MARKER
10 ; RUN: %clang_cc1 -triple aarch64-unknown-linux-gnueabi -emit-llvm \
11 ; RUN: -fembed-bitcode=all -x ir %s -o - \
12 ; RUN: | FileCheck %s -check-prefix=CHECK-ELF
15 ; RUN: %clang_cc1 -triple thumbv7-apple-ios8.0.0 -emit-llvm-bc \
16 ; RUN: -x ir %s -o %t.bc
17 ; RUN: %clang_cc1 -triple thumbv7-apple-ios8.0.0 -emit-llvm \
18 ; RUN: -fembed-bitcode=all -x ir %t.bc -o - \
20 ; RUN: %clang_cc1 -triple thumbv7-apple-ios8.0.0 -emit-llvm \
21 ; RUN: -fembed-bitcode=bitcode -x ir %t.bc -o - \
22 ; RUN: | FileCheck %s -check-prefix=CHECK-ONLY-BITCODE
23 ; RUN: %clang_cc1 -triple thumbv7-apple-ios8.0.0 -emit-llvm \
24 ; RUN: -fembed-bitcode=marker -x ir %t.bc -o - \
25 ; RUN: | FileCheck %s -check-prefix=CHECK-MARKER
27 ; run through -fembed-bitcode twice and make sure it doesn't crash
28 ; RUN: %clang_cc1 -triple thumbv7-apple-ios8.0.0 -emit-llvm-bc \
29 ; RUN: -fembed-bitcode=all -x ir %s -o - \
30 ; RUN: | %clang_cc1 -triple thumbv7-apple-ios8.0.0 -emit-llvm \
31 ; RUN: -fembed-bitcode=all -x ir - -o /dev/null
33 ; check the magic number of bitcode at the beginning of the string
34 ; CHECK: @llvm.embedded.module = private constant
35 ; CHECK: c"\DE\C0\17\0B
36 ; CHECK: section "__LLVM,__bitcode"
37 ; CHECK: @llvm.cmdline = private constant
38 ; CHECK: section "__LLVM,__cmdline"
40 ; check warning options are not embedded
41 ; RUN: %clang_cc1 -triple thumbv7-apple-ios8.0.0 -emit-llvm \
42 ; RUN: -fembed-bitcode=all -x ir %s -o - -Wall -Wundef-prefix=TEST \
43 ; RUN: | FileCheck %s -check-prefix=CHECK-WARNING
45 ; CHECK-ELF: @llvm.embedded.module
46 ; CHECK-ELF-SAME: section ".llvmbc", align 1
47 ; CHECK-ELF: @llvm.cmdline
48 ; CHECK-ELF-SAME: section ".llvmcmd", align 1
50 ; CHECK-ONLY-BITCODE: @llvm.embedded.module = private constant
51 ; CHECK-ONLY-BITCODE: c"\DE\C0\17\0B
52 ; CHECK-ONLY-BITCODE: section "__LLVM,__bitcode"
53 ; CHECK-ONLY-BITCODE-NOT: @llvm.cmdline = private constant
54 ; CHECK-ONLY-BITCODE-NOT: section "__LLVM,__cmdline"
56 ; CHECK-MARKER: @llvm.embedded.module
57 ; CHECK-MARKER: constant [0 x i8] zeroinitializer
58 ; CHECK-MARKER: section "__LLVM,__bitcode"
59 ; CHECK-MARKER: @llvm.cmdline
60 ; CHECK-MARKER: section "__LLVM,__cmdline"
62 ; CHECK-WARNING-NOT: Wall
63 ; CHECK-WARNING-NOT: Wundef-prefix