File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
test/Transforms/Util/DeclareRuntimeLibcalls Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -3457,6 +3457,7 @@ def SystemZZOSSystemLibrary
34573457def emscripten_return_address : RuntimeLibcallImpl<RETURN_ADDRESS>;
34583458
34593459def isWasm : RuntimeLibcallPredicate<"TT.isWasm()">;
3460+ def isOSEmscripten : RuntimeLibcallPredicate<[{TT.isOSEmscripten()}]>;
34603461
34613462// Define the emscripten name for return address helper.
34623463// TODO: when implementing other Wasm backends, make this generic or only do
@@ -3468,6 +3469,9 @@ def WasmSystemLibrary
34683469 exp10f, exp10,
34693470 _Unwind_CallPersonality,
34703471 emscripten_return_address,
3472+ LibcallImpls<(add __small_printf,
3473+ __small_sprintf,
3474+ __small_fprintf), isOSEmscripten>,
34713475 __stack_chk_fail, __stack_chk_guard)>;
34723476
34733477//===----------------------------------------------------------------------===//
Original file line number Diff line number Diff line change 1+ ; REQUIRES: webassembly-registered-target
2+ ; RUN: opt -S -passes=declare-runtime-libcalls -mtriple=wasm64-unknown-emscripten < %s | FileCheck %s
3+
4+ ; CHECK: declare void @__small_fprintf(...)
5+ ; CHECK: declare void @__small_printf(...)
6+ ; CHECK: declare void @__small_sprintf(...)
You can’t perform that action at this time.
0 commit comments