Skip to content

Commit d81725b

Browse files
committed
Only add the template definitions for windows to fix duplicate error for linux
1 parent f4a4661 commit d81725b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/lib/SandboxIR/Constant.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ template class GlobalWithNodeAPI<GlobalVariable, llvm::GlobalVariable,
302302
template class GlobalWithNodeAPI<GlobalAlias, llvm::GlobalAlias, GlobalValue,
303303
llvm::GlobalValue>;
304304

305+
#ifdef _MSC_VER
305306
// These are needed for SandboxIRTest when building with LLVM_BUILD_LLVM_DYLIB
306307
template LLVM_EXPORT_TEMPLATE GlobalIFunc &
307308
GlobalWithNodeAPI<GlobalIFunc, llvm::GlobalIFunc, GlobalObject,
@@ -320,6 +321,7 @@ template LLVM_EXPORT_TEMPLATE GlobalAlias &
320321
GlobalWithNodeAPI<GlobalAlias, llvm::GlobalAlias, GlobalValue,
321322
llvm::GlobalValue>::LLVMGVToGV::operator()(llvm::GlobalAlias
322323
&LLVMGV) const;
324+
#endif
323325

324326
void GlobalIFunc::setResolver(Constant *Resolver) {
325327
Ctx.getTracker()

0 commit comments

Comments
 (0)