aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/FunctionGen.cc
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-17 09:46:23 +0000
committer_ov4 <ov4@ov4.org>2026-10-17 09:46:23 +0000
commit0305500e31eda6fe6da84f88748fc20843aebbce (patch)
tree0ca372b3337764e8cd44e5477fcee63a371fbd26 /lib/CodeGen/FunctionGen.cc
parentc62473ae0f495c280759e8f285e5366855ad7a52 (diff)
refactor(runtime): write runtime diagnostics with fprintf(stderr)
Replace snprintf+write(2) with a single fprintf call on the platform's stderr: the C library's stderr / __stderrp, or __acrt_iob_func(2) on Windows, which the embedded runner binds to the host shim. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Diffstat (limited to 'lib/CodeGen/FunctionGen.cc')
-rw-r--r--lib/CodeGen/FunctionGen.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/FunctionGen.cc b/lib/CodeGen/FunctionGen.cc
index 4e70faf..d985bce 100644
--- a/lib/CodeGen/FunctionGen.cc
+++ b/lib/CodeGen/FunctionGen.cc
@@ -14,7 +14,7 @@ static bool isReservedRuntimeName(const std::string &Name) {
static const char *Reserved[] = {
"__cps_main", "printf", "scanf", "malloc", "free", "strlen", "memcpy",
"strcpy", "strcat", "toupper", "tolower", "sprintf", "snprintf", "strtol", "strtoll",
- "strtod", "memset", "exit", "write",
+ "strtod", "memset", "exit", "fprintf",
"fopen", "fclose", "fgetc", "ungetc", "fputs", "fputc",
"realloc", "strcmp", "__cxa_allocate_exception", "__cxa_throw",
"__cxa_begin_catch", "__cxa_end_catch", "__gxx_personality_v0",