Index: mlir/lib/ExecutionEngine/AsyncRuntime.cpp =================================================================== --- mlir/lib/ExecutionEngine/AsyncRuntime.cpp +++ mlir/lib/ExecutionEngine/AsyncRuntime.cpp @@ -24,8 +24,6 @@ #include #include -using namespace mlir::runtime; - //===----------------------------------------------------------------------===// // Async runtime API. //===----------------------------------------------------------------------===// @@ -167,8 +165,11 @@ std::vector> awaiters; }; -} // namespace runtime -} // namespace mlir +//===----------------------------------------------------------------------===// +// These extern "C" functions have their prototypes declared in C++ +// namespace, to have them properly exported by MSVC, they need to be inside the +// same namespace or be qualified with the namespace. +//===----------------------------------------------------------------------===// // Adds references to reference counted runtime object. extern "C" void mlirAsyncRuntimeAddRef(RefCountedObjPtr ptr, int32_t count) { @@ -342,4 +343,7 @@ std::cout << "Current thread id: " << thisId << std::endl; } +} // namespace runtime +} // namespace mlir + #endif // MLIR_ASYNCRUNTIME_DEFINE_FUNCTIONS