forked from OSchip/llvm-project
[WebAssembly] Allow @object in .type directives.
Reviewers: sbc100 Subscribers: dschuff, jgravelle-google, aheejin, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63955 llvm-svn: 364688
This commit is contained in:
parent
9126c84f50
commit
35bcba4fae
|
@ -187,6 +187,8 @@ public:
|
||||||
WasmSym->setType(wasm::WASM_SYMBOL_TYPE_FUNCTION);
|
WasmSym->setType(wasm::WASM_SYMBOL_TYPE_FUNCTION);
|
||||||
else if (TypeName == "global")
|
else if (TypeName == "global")
|
||||||
WasmSym->setType(wasm::WASM_SYMBOL_TYPE_GLOBAL);
|
WasmSym->setType(wasm::WASM_SYMBOL_TYPE_GLOBAL);
|
||||||
|
else if (TypeName == "object")
|
||||||
|
WasmSym->setType(wasm::WASM_SYMBOL_TYPE_DATA);
|
||||||
else
|
else
|
||||||
return error("Unknown WASM symbol type: ", Lexer->getTok());
|
return error("Unknown WASM symbol type: ", Lexer->getTok());
|
||||||
Lex();
|
Lex();
|
||||||
|
|
|
@ -91,6 +91,7 @@ test0:
|
||||||
|
|
||||||
.section .rodata..L.str,"",@
|
.section .rodata..L.str,"",@
|
||||||
.hidden .L.str
|
.hidden .L.str
|
||||||
|
.type .L.str,@object
|
||||||
.L.str:
|
.L.str:
|
||||||
.int8 'H'
|
.int8 'H'
|
||||||
.asciz "ello, World!"
|
.asciz "ello, World!"
|
||||||
|
|
Loading…
Reference in New Issue