Skip to content

Commit 550d148

Browse files
committed
[SandboxIR] Fix warning when building on Windows with clang-cl. NFC.
This fixes several of these: ``` [1151/3381] Building CXX object lib\SandboxIR\CMakeFiles\LLVMSandboxIR.dir\Constant.cpp.obj C:\git\llvm-project\llvm\lib\SandboxIR\Constant.cpp(331,52): warning: duplicate explicit instantiation of 'operator()' ignored as a Microsoft extension [-Wmicrosoft-template] 331 | llvm::GlobalObject>::LLVMGVToGV::operator()(llvm::GlobalIFunc | ^ C:\git\llvm-project\llvm\include\llvm/SandboxIR/Constant.h(816,52): note: previous explicit instantiation is here 816 | llvm::GlobalObject>::LLVMGVToGV::operator()(llvm::GlobalIFunc | ^ ```
1 parent c4c0ff6 commit 550d148

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/SandboxIR/Constant.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ template class GlobalWithNodeAPI<GlobalVariable, llvm::GlobalVariable,
324324
template class GlobalWithNodeAPI<GlobalAlias, llvm::GlobalAlias, GlobalValue,
325325
llvm::GlobalValue>;
326326

327-
#ifdef _MSC_VER
327+
#if defined(_MSC_VER) && !defined(__clang__)
328328
// These are needed for SandboxIRTest when building with LLVM_BUILD_LLVM_DYLIB
329329
template LLVM_EXPORT_TEMPLATE GlobalIFunc &
330330
GlobalWithNodeAPI<GlobalIFunc, llvm::GlobalIFunc, GlobalObject,

0 commit comments

Comments
 (0)