Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commit 1058fc6

Browse files
committed
Treat all emscripten_asm_const_* function as special Emscripten type in VarArgs expansion.
1 parent 7e7a2e4 commit 1058fc6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/Target/JSBackend/NaCl/ExpandVarArgs.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ INITIALIZE_PASS(ExpandVarArgs, "expand-varargs",
4949
static bool isEmscriptenJSArgsFunc(Module *M, StringRef Name) {
5050
// TODO(jfb) Make these intrinsics in clang and remove the assert: these
5151
// intrinsics should only exist for Emscripten.
52-
bool isEmscriptenSpecial = Name.equals("emscripten_asm_const_int") ||
53-
Name.equals("emscripten_asm_const_double") ||
52+
bool isEmscriptenSpecial = Name.startswith("emscripten_asm_const_") ||
5453
Name.equals("emscripten_landingpad") ||
5554
Name.equals("emscripten_resume");
5655
assert(isEmscriptenSpecial ? Triple(M->getTargetTriple()).isOSEmscripten()

0 commit comments

Comments
 (0)