LLVM  5.0.0
Public Member Functions | Static Public Member Functions | List of all members
llvm::FunctionImportGlobalProcessing Class Reference

Class to handle necessary GlobalValue changes required by ThinLTO function importing, including linkage changes and any necessary renaming. More...

#include "llvm/Transforms/Utils/FunctionImportUtils.h"

Public Member Functions

 FunctionImportGlobalProcessing (Module &M, const ModuleSummaryIndex &Index, SetVector< GlobalValue * > *GlobalsToImport=nullptr)
 
bool run ()
 

Static Public Member Functions

static bool doImportAsDefinition (const GlobalValue *SGV, SetVector< GlobalValue * > *GlobalsToImport)
 Checks if we should import SGV as a definition, otherwise import as a declaration. More...
 

Detailed Description

Class to handle necessary GlobalValue changes required by ThinLTO function importing, including linkage changes and any necessary renaming.

Definition at line 26 of file FunctionImportUtils.h.

Constructor & Destructor Documentation

llvm::FunctionImportGlobalProcessing::FunctionImportGlobalProcessing ( Module &  M,
const ModuleSummaryIndex &  Index,
SetVector< GlobalValue * > *  GlobalsToImport = nullptr 
)
inline

Member Function Documentation

bool FunctionImportGlobalProcessing::doImportAsDefinition ( const GlobalValue *  SGV,
SetVector< GlobalValue * > *  GlobalsToImport 
)
static

Checks if we should import SGV as a definition, otherwise import as a declaration.

Definition at line 23 of file FunctionImportUtils.cpp.

References llvm::SetVector< T, Vector, Set >::count(), llvm::GlobalValue::getBaseObject(), and llvm::GlobalValue::hasLinkOnceODRLinkage().

bool FunctionImportGlobalProcessing::run ( )

Definition at line 253 of file FunctionImportUtils.cpp.

Referenced by llvm::renameModuleForThinLTO().


The documentation for this class was generated from the following files: