|
LLVM
3.7.0
|
#include "llvm/Linker/Linker.h"#include "llvm-c/Linker.h"#include "llvm/ADT/Hashing.h"#include "llvm/ADT/Optional.h"#include "llvm/ADT/SetVector.h"#include "llvm/ADT/SmallString.h"#include "llvm/ADT/Statistic.h"#include "llvm/ADT/Triple.h"#include "llvm/IR/Constants.h"#include "llvm/IR/DebugInfo.h"#include "llvm/IR/DiagnosticInfo.h"#include "llvm/IR/DiagnosticPrinter.h"#include "llvm/IR/LLVMContext.h"#include "llvm/IR/Module.h"#include "llvm/IR/TypeFinder.h"#include "llvm/Support/CommandLine.h"#include "llvm/Support/Debug.h"#include "llvm/Support/raw_ostream.h"#include "llvm/Transforms/Utils/Cloning.h"#include <cctype>#include <tuple>Go to the source code of this file.
Functions | |
| static void | forceRenaming (GlobalValue *GV, StringRef Name) |
| The LLVM SymbolTable class autorenames globals that conflict in the symbol table. More... | |
| static void | copyGVAttributes (GlobalValue *DestGV, const GlobalValue *SrcGV) |
| copy additional attributes (those not needed to construct a GlobalValue) from the SrcGV to the DestGV. More... | |
| static bool | isLessConstraining (GlobalValue::VisibilityTypes a, GlobalValue::VisibilityTypes b) |
| static GlobalVariable * | copyGlobalVariableProto (TypeMapTy &TypeMap, Module &DstM, const GlobalVariable *SGVar) |
| Loop through the global variables in the src module and merge them into the dest module. More... | |
| static Function * | copyFunctionProto (TypeMapTy &TypeMap, Module &DstM, const Function *SF) |
| Link the function in the source module into the destination module if needed, setting up mapping information. More... | |
| static GlobalAlias * | copyGlobalAliasProto (TypeMapTy &TypeMap, Module &DstM, const GlobalAlias *SGA) |
| Set up prototypes for any aliases that come over from the source module. More... | |
| static GlobalValue * | copyGlobalValueProto (TypeMapTy &TypeMap, Module &DstM, const GlobalValue *SGV) |
| static void | upgradeGlobalArray (GlobalVariable *GV) |
| static void | getArrayElements (const Constant *C, SmallVectorImpl< Constant * > &Dest) |
| static bool | triplesMatch (const Triple &T0, const Triple &T1) |
| static std::string | mergeTriples (const Triple &SrcTriple, const Triple &DstTriple) |
| LLVMBool | LLVMLinkModules (LLVMModuleRef Dest, LLVMModuleRef Src, LLVMLinkerMode Unused, char **OutMessages) |
|
static |
Link the function in the source module into the destination module if needed, setting up mapping information.
Definition at line 571 of file LinkModules.cpp.
References llvm::Function::getFunctionType(), llvm::GlobalValue::getLinkage(), and llvm::Value::getName().
Referenced by copyGlobalValueProto().
|
static |
Set up prototypes for any aliases that come over from the source module.
Definition at line 580 of file LinkModules.cpp.
References llvm::GlobalValue::getLinkage(), llvm::Value::getName(), and llvm::GlobalValue::getType().
Referenced by copyGlobalValueProto().
|
static |
Definition at line 588 of file LinkModules.cpp.
References copyFunctionProto(), copyGlobalAliasProto(), copyGlobalVariableProto(), and copyGVAttributes().
|
static |
Loop through the global variables in the src module and merge them into the dest module.
Definition at line 555 of file LinkModules.cpp.
References llvm::PointerType::getAddressSpace(), llvm::SequentialType::getElementType(), llvm::GlobalValue::getLinkage(), llvm::Value::getName(), llvm::GlobalValue::getThreadLocalMode(), llvm::GlobalValue::getType(), and llvm::GlobalVariable::isConstant().
Referenced by copyGlobalValueProto().
|
static |
copy additional attributes (those not needed to construct a GlobalValue) from the SrcGV to the DestGV.
Definition at line 535 of file LinkModules.cpp.
References llvm::GlobalValue::copyAttributesFrom(), forceRenaming(), and llvm::Value::getName().
Referenced by copyGlobalValueProto().
|
static |
The LLVM SymbolTable class autorenames globals that conflict in the symbol table.
This is good for all clients except for us. Go through the trouble to force this back.
Definition at line 515 of file LinkModules.cpp.
References llvm::Value::getName(), llvm::Module::getNamedValue(), llvm::GlobalValue::getParent(), llvm::GlobalValue::hasLocalLinkage(), llvm::Value::setName(), and llvm::Value::takeName().
Referenced by copyGVAttributes().
|
static |
Definition at line 1129 of file LinkModules.cpp.
References llvm::Constant::getAggregateElement(), llvm::Value::getType(), and llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back().
|
static |
Definition at line 540 of file LinkModules.cpp.
| LLVMBool LLVMLinkModules | ( | LLVMModuleRef | Dest, |
| LLVMModuleRef | Src, | ||
| LLVMLinkerMode | Unused, | ||
| char ** | OutMessages | ||
| ) |
Definition at line 1798 of file LinkModules.cpp.
References llvm::raw_ostream::flush(), llvm::Linker::LinkModules(), llvm::DiagnosticInfo::print(), and llvm::unwrap().
Definition at line 1480 of file LinkModules.cpp.
References Apple, llvm::Triple::getVendor(), llvm::Triple::isOSVersionLT(), and llvm::Triple::str().
Definition at line 1468 of file LinkModules.cpp.
References Apple, llvm::Triple::getArch(), llvm::Triple::getOS(), llvm::Triple::getSubArch(), llvm::Triple::getVendor(), and T1.
|
static |
Definition at line 889 of file LinkModules.cpp.
References llvm::GlobalVariable::copyAttributesFrom(), llvm::dyn_cast(), llvm::Value::getContext(), llvm::SequentialType::getElementType(), llvm::GlobalVariable::getInitializer(), llvm::GlobalValue::getLinkage(), llvm::ArrayType::getNumElements(), llvm::User::getNumOperands(), llvm::User::getOperand(), llvm::GlobalValue::getParent(), llvm::GlobalValue::getThreadLocalMode(), llvm::GlobalValue::getType(), llvm::GlobalVariable::isConstant(), Null, llvm::User::operands(), and llvm::Value::takeName().
1.8.6