Current tooling for the WebAssembly component model uses import modules and names such as `$root` and `[thread-index]`. Importing these from assembly files requires support for non-valid identifiers in `.import_name` and `.import_module` directives. This PR adds support for specifying those as strings, e.g.: ```asm .import_module __wasm_component_model_builtin_thread_index, "$root" .import_name __wasm_component_model_builtin_thread_index, "[thread-index]" ```
17 lines
340 B
LLVM
17 lines
340 B
LLVM
; RUN: llc < %s -asm-verbose=false -wasm-keep-registers | FileCheck %s
|
|
|
|
target triple = "wasm32-unknown-unknown"
|
|
|
|
define void @test() #0 {
|
|
ret void
|
|
}
|
|
|
|
declare void @test2() #1
|
|
|
|
|
|
attributes #0 = { "wasm-export-name"="foo" }
|
|
attributes #1 = { "wasm-export-name"="bar" }
|
|
|
|
; CHECK: .export_name test, "foo"
|
|
; CHECK: .export_name test2, "bar"
|