From fc109152eabcbc013d152e0a9599c4422f58203c Mon Sep 17 00:00:00 2001 From: Steven Wu Date: Wed, 12 Dec 2018 17:30:16 +0000 Subject: [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 --- test/Driver/embed-bitcode.s | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test/Driver/embed-bitcode.s (limited to 'test/Driver') 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 -- cgit v1.2.1