mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
f73e4af6a5
Add an WASM_SYMBOL_NO_STRIP flag, so that __attribute__((used)) doesn't need to imply exporting. When targeting Emscripten, have WASM_SYMBOL_NO_STRIP imply exporting. Differential Revision: https://reviews.llvm.org/D62542 llvm-svn: 370415
22 lines
558 B
LLVM
22 lines
558 B
LLVM
; RUN: llc -filetype=obj -wasm-keep-registers %s -o - | llvm-readobj --symbols | FileCheck %s
|
|
|
|
target triple = "wasm32-unknown-unknown"
|
|
|
|
@llvm.used = appending global [1 x i8*] [i8* bitcast (i32 ()* @foo to i8*)], section "llvm.metadata"
|
|
|
|
define i32 @foo() {
|
|
entry:
|
|
ret i32 0
|
|
}
|
|
|
|
; CHECK: Symbols [
|
|
; CHECK-NEXT: Symbol {
|
|
; CHECK-NEXT: Name: foo
|
|
; CHECK-NEXT: Type: FUNCTION (0x0)
|
|
; CHECK-NEXT: Flags [ (0x80)
|
|
; CHECK-NEXT: NO_STRIP (0x80)
|
|
; CHECK-NEXT: ]
|
|
; CHECK-NEXT: ElementIndex: 0x0
|
|
; CHECK-NEXT: }
|
|
; CHECK-NEXT: ]
|