[PATCH] D45386: [WebAssembly] Enabled -triple=wasm32-unknown-unknown-wasm path using ELF directive parser.
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 19 15:04:17 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL330370: [WebAssembly] Enabled -triple=wasm32-unknown-unknown-wasm path using ELF… (authored by sbc, committed by ).
Repository:
rL LLVM
https://reviews.llvm.org/D45386
Files:
llvm/trunk/lib/MC/MCParser/AsmParser.cpp
llvm/trunk/test/MC/WebAssembly/basic-assembly.s
Index: llvm/trunk/test/MC/WebAssembly/basic-assembly.s
===================================================================
--- llvm/trunk/test/MC/WebAssembly/basic-assembly.s
+++ llvm/trunk/test/MC/WebAssembly/basic-assembly.s
@@ -1,4 +1,5 @@
# RUN: llvm-mc -triple=wasm32-unknown-unknown-elf < %s | FileCheck %s
+# RUN: llvm-mc -triple=wasm32-unknown-unknown-wasm < %s | FileCheck %s
.text
.type test0, at function
Index: llvm/trunk/lib/MC/MCParser/AsmParser.cpp
===================================================================
--- llvm/trunk/lib/MC/MCParser/AsmParser.cpp
+++ llvm/trunk/lib/MC/MCParser/AsmParser.cpp
@@ -691,7 +691,11 @@
PlatformParser.reset(createELFAsmParser());
break;
case MCObjectFileInfo::IsWasm:
- llvm_unreachable("Wasm parsing not supported yet");
+ // TODO: WASM will need its own MCAsmParserExtension implementation, but
+ // for now we can re-use the ELF one, since the directives can be the
+ // same for now, and this makes the -triple=wasm32-unknown-unknown-wasm
+ // path work.
+ PlatformParser.reset(createELFAsmParser());
break;
}
@@ -1305,7 +1309,7 @@
/// the End argument will be filled with the last location pointed to the '>'
/// character.
-/// There is a gap between the AltMacro's documentation and the single quote implementation.
+/// There is a gap between the AltMacro's documentation and the single quote implementation.
/// GCC does not fully support this feature and so we will not support it.
/// TODO: Adding single quote as a string.
bool AsmParser::isAltmacroString(SMLoc &StrLoc, SMLoc &EndLoc) {
@@ -2204,7 +2208,7 @@
}
// Parse and erase curly braces marking block start/end
-bool
+bool
AsmParser::parseCurlyBlockScope(SmallVectorImpl<AsmRewrite> &AsmStrRewrites) {
// Identify curly brace marking block start/end
if (Lexer.isNot(AsmToken::LCurly) && Lexer.isNot(AsmToken::RCurly))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45386.143168.patch
Type: text/x-patch
Size: 1918 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180419/0a9c92f4/attachment.bin>
More information about the llvm-commits
mailing list