Skip to content

Commit ace136b

Browse files
committed
Force flush after wrapper code execution
1 parent 0ce3808 commit ace136b

File tree

1 file changed

+5
-0
lines changed
  • interpreter/CppInterOp/include/clang/Interpreter

1 file changed

+5
-0
lines changed

interpreter/CppInterOp/include/clang/Interpreter/CppInterOp.h

+5
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <set>
1616
#include <string>
1717
#include <vector>
18+
#include <iostream>
1819

1920
// The cross-platform CPPINTEROP_API macro definition
2021
#if defined _WIN32 || defined __CYGWIN__
@@ -164,6 +165,8 @@ namespace Cpp {
164165
ReportInvokeStart(result, args, self);
165166
#endif // NDEBUG
166167
m_GenericCall(self, args.m_ArgSize, args.m_Args, result);
168+
std::cout.flush();
169+
::fflush(stdout);
167170
}
168171
/// Makes a call to a destructor.
169172
///\param[in] object - the pointer of the object whose destructor we call.
@@ -179,6 +182,8 @@ namespace Cpp {
179182
ReportInvokeStart(object, nary, withFree);
180183
#endif // NDEBUG
181184
m_DestructorCall(object, nary, withFree);
185+
std::cout.flush();
186+
::fflush(stdout);
182187
}
183188
};
184189

0 commit comments

Comments
 (0)