File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,8 @@ namespace llvm {
42
42
class MachineDominatorTree ;
43
43
// Implementation in LoopInfoImpl.h
44
44
class MachineLoop ;
45
- extern template class LoopBase <MachineBasicBlock, MachineLoop>;
45
+ extern template class LLVM_TEMPLATE_ABI
46
+ LoopBase<MachineBasicBlock, MachineLoop>;
46
47
47
48
class MachineLoop : public LoopBase <MachineBasicBlock, MachineLoop> {
48
49
public:
Original file line number Diff line number Diff line change @@ -657,8 +657,14 @@ class LLVM_TEMPLATE_ABI InnerAnalysisManagerProxy
657
657
AnalysisManagerT *InnerAM;
658
658
};
659
659
660
+ // NOTE: The LLVM_ABI annotation cannot be used here because MSVC disallows
661
+ // storage-class specifiers on class members outside of the class declaration
662
+ // (C2720). LLVM_ATTRIBUTE_VISIBILITY_DEFAULT only applies to non-Windows
663
+ // targets so it is used instead. Without this annotation, compiling LLVM as a
664
+ // shared library with -fvisibility=hidden using GCC fails to export the symbol
665
+ // even though InnerAnalysisManagerProxy is already annotated with LLVM_ABI.
660
666
template <typename AnalysisManagerT, typename IRUnitT, typename ... ExtraArgTs>
661
- AnalysisKey
667
+ LLVM_ATTRIBUTE_VISIBILITY_DEFAULT AnalysisKey
662
668
InnerAnalysisManagerProxy<AnalysisManagerT, IRUnitT, ExtraArgTs...>::Key;
663
669
664
670
// / Provide the \c FunctionAnalysisManager to \c Module proxy.
You can’t perform that action at this time.
0 commit comments