Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
llvm-nm: Observe -no-llvm-bc for archive members
Summary: This change fixes the `-no-llvm-bc` flag to work with object files within archives. Currently the `-no-llvm-bc` flag works for regular object files, but not static libraries, where it continues to show bitcode symbol info. Original support was added in D4371. Reviewers: compnerd, smeenai, pcc Reviewed By: compnerd Subscribers: rupprecht, keith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D48798 llvm-svn: 354196
- Loading branch information
1 parent
358f99c
commit 5fc9edf
Showing
2 changed files
with
23 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
; RUN: rm -rf %t && mkdir -p %t | ||
; RUN: grep -v "module asm" %s | llvm-as -o %t/embedded.bc | ||
; RUN: llc -I=%t -filetype=obj -o %t/obj.o %s | ||
; RUN: llvm-ar crs %t/lib.a %t/obj.o | ||
; RUN: llvm-nm -m -no-llvm-bc %t/lib.a | FileCheck %s | ||
|
||
target triple = "x86_64-apple-macosx10.11" | ||
|
||
@q = global i32 1, align 4 | ||
; CHECK-NOT: {{-+}} (LTO,DATA) external _q | ||
; CHECK: {{[[:xdigit:]]+}} (__DATA,__data) external _q | ||
|
||
module asm ".section __LLVM,__bitcode" | ||
module asm ".incbin \22embedded.bc\22" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters