From 5c953e3267ebfc4b0430aea2b296348fa6320d38 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 8 Dec 2015 14:54:49 +0000 Subject: [PATCH] Move all private members together. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255021 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Linker/LinkModules.cpp | 45 +++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp index a2bc9560221..a9fcee7c98c 100644 --- a/lib/Linker/LinkModules.cpp +++ b/lib/Linker/LinkModules.cpp @@ -420,29 +420,6 @@ class ModuleLinker { bool HasError = false; -public: - ModuleLinker(Module &DstM, Linker::IdentifiedStructTypeSet &Set, Module &SrcM, - DiagnosticHandlerFunction DiagnosticHandler, unsigned Flags, - const FunctionInfoIndex *Index = nullptr, - DenseSet *FunctionsToImport = nullptr) - : DstM(DstM), SrcM(SrcM), TypeMap(Set), ValMaterializer(this), - DiagnosticHandler(DiagnosticHandler), Flags(Flags), ImportIndex(Index), - ImportFunction(FunctionsToImport) { - assert((ImportIndex || !ImportFunction) && - "Expect a FunctionInfoIndex when importing"); - // If we have a FunctionInfoIndex but no function to import, - // then this is the primary module being compiled in a ThinLTO - // backend compilation, and we need to see if it has functions that - // may be exported to another backend compilation. - if (ImportIndex && !ImportFunction) - HasExportedFunctions = ImportIndex->hasExportedFunctions(SrcM); - } - - bool run(); - Value *materializeDeclFor(Value *V); - void materializeInitFor(GlobalValue *New, GlobalValue *Old); - -private: bool shouldOverrideFromSrc() { return Flags & Linker::OverrideFromSrc; } bool shouldLinkOnlyNeeded() { return Flags & Linker::LinkOnlyNeeded; } bool shouldInternalizeLinkedSymbols() { @@ -556,6 +533,28 @@ private: const GlobalValue *DGV = nullptr); void linkNamedMDNodes(); + +public: + ModuleLinker(Module &DstM, Linker::IdentifiedStructTypeSet &Set, Module &SrcM, + DiagnosticHandlerFunction DiagnosticHandler, unsigned Flags, + const FunctionInfoIndex *Index = nullptr, + DenseSet *FunctionsToImport = nullptr) + : DstM(DstM), SrcM(SrcM), TypeMap(Set), ValMaterializer(this), + DiagnosticHandler(DiagnosticHandler), Flags(Flags), ImportIndex(Index), + ImportFunction(FunctionsToImport) { + assert((ImportIndex || !ImportFunction) && + "Expect a FunctionInfoIndex when importing"); + // If we have a FunctionInfoIndex but no function to import, + // then this is the primary module being compiled in a ThinLTO + // backend compilation, and we need to see if it has functions that + // may be exported to another backend compilation. + if (ImportIndex && !ImportFunction) + HasExportedFunctions = ImportIndex->hasExportedFunctions(SrcM); + } + + bool run(); + Value *materializeDeclFor(Value *V); + void materializeInitFor(GlobalValue *New, GlobalValue *Old); }; } -- 2.34.1