Lines Matching defs:Module

1 //===-- Module.cpp - Implement the Module class ---------------------------===//
10 // This file implements the Module class for the IR library.
14 #include "llvm/IR/Module.h"
40 template class llvm::SymbolTableListTraits<Function, Module>;
41 template class llvm::SymbolTableListTraits<GlobalVariable, Module>;
42 template class llvm::SymbolTableListTraits<GlobalAlias, Module>;
45 // Primitive Module methods.
48 Module::Module(StringRef MID, LLVMContext &C)
55 Module::~Module() {
70 GlobalValue *Module::getNamedValue(StringRef Name) const {
76 unsigned Module::getMDKindID(StringRef Name) const {
83 void Module::getMDKindNames(SmallVectorImpl<StringRef> &Result) const {
97 Constant *Module::getOrInsertFunction(StringRef Name,
120 Constant *Module::getOrInsertFunction(StringRef Name,
130 Constant *Module::getOrInsertFunction(StringRef Name,
149 Constant *Module::getOrInsertFunction(StringRef Name,
170 Function *Module::getFunction(StringRef Name) const {
185 GlobalVariable *Module::getGlobalVariable(StringRef Name, bool AllowLocal) {
199 Constant *Module::getOrInsertGlobal(StringRef Name, Type *Ty) {
228 GlobalAlias *Module::getNamedAlias(StringRef Name) const {
235 NamedMDNode *Module::getNamedMetadata(const Twine &Name) const {
244 NamedMDNode *Module::getOrInsertNamedMetadata(StringRef Name) {
257 void Module::eraseNamedMetadata(NamedMDNode *NMD) {
263 void Module::
284 Value *Module::getModuleFlag(StringRef Key) const {
285 SmallVector<Module::ModuleFlagEntry, 8> ModuleFlags;
297 NamedMDNode *Module::getModuleFlagsMetadata() const {
304 NamedMDNode *Module::getOrInsertModuleFlagsMetadata() {
311 void Module::addModuleFlag(ModFlagBehavior Behavior, StringRef Key,
319 void Module::addModuleFlag(ModFlagBehavior Behavior, StringRef Key,
324 void Module::addModuleFlag(MDNode *Node) {
333 void Module::setDataLayout(StringRef Desc) {
345 void Module::setDataLayout(const DataLayout *Other) {
355 const DataLayout *Module::getDataLayout() const {
363 RandomNumberGenerator &Module::getRNG() const {
372 // Methods to control the materialization of GlobalValues in the Module.
374 void Module::setMaterializer(GVMaterializer *GVM) {
376 "Module already has a GVMaterializer. Call MaterializeAllPermanently"
381 bool Module::isMaterializable(const GlobalValue *GV) const {
387 bool Module::isDematerializable(const GlobalValue *GV) const {
393 bool Module::Materialize(GlobalValue *GV, std::string *ErrInfo) {
405 void Module::Dematerialize(GlobalValue *GV) {
410 std::error_code Module::materializeAll() {
416 std::error_code Module::materializeAllPermanently(bool ReleaseBuffer) {
439 void Module::dropAllReferences() {
450 unsigned Module::getDwarfVersion() const {
457 Comdat *Module::getOrInsertComdat(StringRef Name) {