diff --git a/llvm/lib/SandboxIR/Constant.cpp b/llvm/lib/SandboxIR/Constant.cpp index 3e13c935c4281..f674d7baef347 100644 --- a/llvm/lib/SandboxIR/Constant.cpp +++ b/llvm/lib/SandboxIR/Constant.cpp @@ -302,7 +302,7 @@ template class GlobalWithNodeAPI; -#ifdef _MSC_VER +#if defined(_MSC_VER) && !defined(__clang__) // These are needed for SandboxIRTest when building with LLVM_BUILD_LLVM_DYLIB template LLVM_EXPORT_TEMPLATE GlobalIFunc & GlobalWithNodeAPI