diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-17 09:46:23 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-17 09:46:23 +0000 |
| commit | 0305500e31eda6fe6da84f88748fc20843aebbce (patch) | |
| tree | 0ca372b3337764e8cd44e5477fcee63a371fbd26 /include/cps | |
| parent | c62473ae0f495c280759e8f285e5366855ad7a52 (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 'include/cps')
| -rw-r--r-- | include/cps/RuntimeCheck.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/cps/RuntimeCheck.h b/include/cps/RuntimeCheck.h index 8f33e99..30a1910 100644 --- a/include/cps/RuntimeCheck.h +++ b/include/cps/RuntimeCheck.h @@ -14,10 +14,9 @@ class RuntimeCheck { llvm::LLVMContext &TheContext; llvm::IRBuilder<> &Builder; - llvm::FunctionCallee SnprintfFunc; - llvm::FunctionCallee WriteFunc; - llvm::FunctionCallee StrLenFunc; - llvm::GlobalVariable *ErrBuf; + llvm::FunctionCallee FprintfFunc; + llvm::FunctionCallee StderrFunc; // Windows: __acrt_iob_func(2) + llvm::GlobalVariable *StderrVar; // elsewhere: the C library's stderr ExceptionHandler &Exceptions; llvm::Value *DivZeroMsg; llvm::Value *OutOfBoundsMsg; |
