LLVM API Documentation
#include "llvm/Linker.h"#include "llvm-c/Linker.h"#include "llvm/ADT/Optional.h"#include "llvm/ADT/SetVector.h"#include "llvm/ADT/SmallString.h"#include "llvm/IR/Constants.h"#include "llvm/IR/Module.h"#include "llvm/IR/TypeFinder.h"#include "llvm/Support/Debug.h"#include "llvm/Support/raw_ostream.h"#include "llvm/Transforms/Utils/Cloning.h"
Go to the source code of this file.
Functions | |
| static void | forceRenaming (GlobalValue *GV, StringRef Name) |
| static void | copyGVAttributes (GlobalValue *DestGV, const GlobalValue *SrcGV) |
| static bool | isLessConstraining (GlobalValue::VisibilityTypes a, GlobalValue::VisibilityTypes b) |
| static void | getArrayElements (Constant *C, SmallVectorImpl< Constant * > &Dest) |
| LLVMBool | LLVMLinkModules (LLVMModuleRef Dest, LLVMModuleRef Src, LLVMLinkerMode Mode, char **OutMessages) |
| static void copyGVAttributes | ( | GlobalValue * | DestGV, |
| const GlobalValue * | SrcGV | ||
| ) | [static] |
copyGVAttributes - copy additional attributes (those not needed to construct a GlobalValue) from the SrcGV to the DestGV.
Definition at line 468 of file LinkModules.cpp.
References llvm::GlobalValue::copyAttributesFrom(), forceRenaming(), llvm::GlobalValue::getAlignment(), llvm::Value::getName(), and llvm::GlobalValue::setAlignment().
| static void forceRenaming | ( | GlobalValue * | GV, |
| StringRef | Name | ||
| ) | [static] |
forceRenaming - 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 448 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 void getArrayElements | ( | Constant * | C, |
| SmallVectorImpl< Constant * > & | Dest | ||
| ) | [static] |
Definition at line 878 of file LinkModules.cpp.
References llvm::Constant::getAggregateElement(), llvm::Value::getType(), and llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back().
| static bool isLessConstraining | ( | GlobalValue::VisibilityTypes | a, |
| GlobalValue::VisibilityTypes | b | ||
| ) | [static] |
Definition at line 477 of file LinkModules.cpp.
References llvm::GlobalValue::HiddenVisibility, and llvm::GlobalValue::ProtectedVisibility.
| LLVMBool LLVMLinkModules | ( | LLVMModuleRef | Dest, |
| LLVMModuleRef | Src, | ||
| LLVMLinkerMode | Mode, | ||
| char ** | OutMessages | ||
| ) |
Definition at line 1329 of file LinkModules.cpp.
References llvm::Linker::LinkModules(), llvm::LibFunc::strdup, and llvm::unwrap().