diff options
author | Steven Wu <stevenwu@apple.com> | 2018-12-12 17:30:16 +0000 |
---|---|---|
committer | Steven Wu <stevenwu@apple.com> | 2018-12-12 17:30:16 +0000 |
commit | fc109152eabcbc013d152e0a9599c4422f58203c (patch) | |
tree | ece73e7a4a0e254a5a0c915c422164994524d07a /test/Driver | |
parent | bbecc2dcf078e7f40a97f1c040bb49856c62aeb9 (diff) | |
download | clang-fc109152eabcbc013d152e0a9599c4422f58203c.tar.gz |
[Driver] Add support for -fembed-bitcode for assembly file
Summary:
Handle -fembed-bitcode for assembly inputs. When the input file is
assembly, write a marker as "__LLVM,__asm" section.
Fix llvm.org/pr39659
Reviewers: compnerd, dexonsmith
Reviewed By: compnerd
Subscribers: rjmccall, dblaikie, jkorous, cfe-commits
Differential Revision: https://reviews.llvm.org/D55525
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@348943 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Driver')
-rw-r--r-- | test/Driver/embed-bitcode.s | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Driver/embed-bitcode.s b/test/Driver/embed-bitcode.s new file mode 100644 index 0000000000..71a3e9c2fb --- /dev/null +++ b/test/Driver/embed-bitcode.s @@ -0,0 +1,12 @@ +// REQUIRES: arm-registered-target + +// RUN: %clang -c -target armv7-apple-ios10 %s -fembed-bitcode -### 2>&1 | FileCheck %s -check-prefix=CHECK-AS +// RUN: %clang -c -target armv7-apple-ios10 %s -fembed-bitcode-marker -### 2>&1 | FileCheck %s -check-prefix=CHECK-AS-MARKER +// CHECK-AS: -cc1as +// CHECK-AS: -fembed-bitcode=all +// CHECK-AS-MARKER: -fembed-bitcode=marker + +// RUN: %clang -c -target armv7-apple-ios10 %s -fembed-bitcode -o %t.o +// RUN: llvm-readobj -section-headers %t.o | FileCheck --check-prefix=CHECK-SECTION %s +// CHECK-SECTION: Name: __asm +// CHECK-SECTION-NEXT: Segment: __LLVM |