Skip to content

Commit

Permalink
[WebAssembly] Allow @object in .type directives.
Browse files Browse the repository at this point in the history
Reviewers: sbc100

Subscribers: dschuff, jgravelle-google, aheejin, sunfish, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D63955

llvm-svn: 364688
  • Loading branch information
aardappel committed Jun 28, 2019
1 parent 9126c84 commit 35bcba4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions llvm/lib/MC/MCParser/WasmAsmParser.cpp
Expand Up @@ -187,6 +187,8 @@ class WasmAsmParser : public MCAsmParserExtension {
WasmSym->setType(wasm::WASM_SYMBOL_TYPE_FUNCTION);
else if (TypeName == "global")
WasmSym->setType(wasm::WASM_SYMBOL_TYPE_GLOBAL);
else if (TypeName == "object")
WasmSym->setType(wasm::WASM_SYMBOL_TYPE_DATA);
else
return error("Unknown WASM symbol type: ", Lexer->getTok());
Lex();
Expand Down
1 change: 1 addition & 0 deletions llvm/test/MC/WebAssembly/basic-assembly.s
Expand Up @@ -91,6 +91,7 @@ test0:

.section .rodata..L.str,"",@
.hidden .L.str
.type .L.str,@object
.L.str:
.int8 'H'
.asciz "ello, World!"
Expand Down

0 comments on commit 35bcba4

Please sign in to comment.