diff --git a/llvm/include/llvm/Analysis/LazyCallGraph.h b/llvm/include/llvm/Analysis/LazyCallGraph.h --- a/llvm/include/llvm/Analysis/LazyCallGraph.h +++ b/llvm/include/llvm/Analysis/LazyCallGraph.h @@ -419,7 +419,7 @@ /// outer structure. SCCs do not support mutation of the call graph, that /// must be done through the containing \c RefSCC in order to fully reason /// about the ordering and connections of the graph. - class SCC { + class LLVM_EXTERNAL_VISIBILITY SCC { friend class LazyCallGraph; friend class LazyCallGraph::Node; diff --git a/llvm/include/llvm/Analysis/LoopInfo.h b/llvm/include/llvm/Analysis/LoopInfo.h --- a/llvm/include/llvm/Analysis/LoopInfo.h +++ b/llvm/include/llvm/Analysis/LoopInfo.h @@ -527,7 +527,7 @@ /// Represents a single loop in the control flow graph. Note that not all SCCs /// in the CFG are necessarily loops. -class Loop : public LoopBase { +class LLVM_EXTERNAL_VISIBILITY Loop : public LoopBase { public: /// A range representing the start and end location of a loop. class LocRange { diff --git a/llvm/include/llvm/Analysis/LoopNestAnalysis.h b/llvm/include/llvm/Analysis/LoopNestAnalysis.h --- a/llvm/include/llvm/Analysis/LoopNestAnalysis.h +++ b/llvm/include/llvm/Analysis/LoopNestAnalysis.h @@ -25,7 +25,7 @@ class LPMUpdater; /// This class represents a loop nest and can be used to query its properties. -class LoopNest { +class LLVM_EXTERNAL_VISIBILITY LoopNest { public: using InstrVectorTy = SmallVector; diff --git a/llvm/include/llvm/CodeGen/MachineFunction.h b/llvm/include/llvm/CodeGen/MachineFunction.h --- a/llvm/include/llvm/CodeGen/MachineFunction.h +++ b/llvm/include/llvm/CodeGen/MachineFunction.h @@ -227,7 +227,7 @@ : LandingPadBlock(MBB) {} }; -class MachineFunction { +class LLVM_EXTERNAL_VISIBILITY MachineFunction { Function &F; const LLVMTargetMachine &Target; const TargetSubtargetInfo *STI; diff --git a/llvm/include/llvm/IR/Function.h b/llvm/include/llvm/IR/Function.h --- a/llvm/include/llvm/IR/Function.h +++ b/llvm/include/llvm/IR/Function.h @@ -58,7 +58,8 @@ class BranchProbabilityInfo; class BlockFrequencyInfo; -class Function : public GlobalObject, public ilist_node { +class LLVM_EXTERNAL_VISIBILITY Function : public GlobalObject, + public ilist_node { public: using BasicBlockListType = SymbolTableList; diff --git a/llvm/include/llvm/IR/Module.h b/llvm/include/llvm/IR/Module.h --- a/llvm/include/llvm/IR/Module.h +++ b/llvm/include/llvm/IR/Module.h @@ -64,9 +64,9 @@ /// constant references to global variables in the module. When a global /// variable is destroyed, it should have no entries in the GlobalValueRefMap. /// The main container class for the LLVM Intermediate Representation. -class Module { -/// @name Types And Enumerations -/// @{ +class LLVM_EXTERNAL_VISIBILITY Module { + /// @name Types And Enumerations + /// @{ public: /// The type for the list of global variables. using GlobalListType = SymbolTableList;