================
@@ -352,6 +352,20 @@ int main(int argc, const char **argv) {
Interp = ExitOnErr(clang::Interpreter::create(std::move(CI), Config));
}
+ if (Config.IsOutOfProcess) {
+ static const char *const InitUnbufferedStreams = R"(
+ #include <stdio.h>
+ __attribute__((constructor))
+ static void __clang_repl_ioinit(void) {
+ setvbuf(stdout, NULL, _IONBF, 0);
+ setvbuf(stderr, NULL, _IONBF, 0);
----------------
vgvassilev wrote:
Ok, we cannot afford including headers. How about declaring `void
__clang_repl_ioinit(void)` and defining it in the compiled code like we do with
the `__clang_Interpreter_SetValue`.
@lhames, can you think of any other way to handle this problem?
https://github.com/llvm/llvm-project/pull/166368
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits