================
@@ -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:

```suggestion
       int setvbuf(FILE *restrict stream, char *restrict buf, int type, size_t 
size);
        setvbuf(stdout, NULL, _IONBF, 0);
        setvbuf(stderr, NULL, _IONBF, 0);
```

https://github.com/llvm/llvm-project/pull/166368
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to