LLVM API Documentation
#include <GlobalValue.h>


Definition at line 29 of file GlobalValue.h.
An enumeration for the kinds of linkage for global values.
| ExternalLinkage |
Externally visible function. |
| AvailableExternallyLinkage |
Available for inspection, not emission. |
| LinkOnceAnyLinkage |
Keep one copy of function when linking (inline) |
| LinkOnceODRLinkage |
Same, but only replaced by something equivalent. |
| LinkOnceODRAutoHideLinkage |
Like LinkOnceODRLinkage but addr not taken. |
| WeakAnyLinkage |
Keep one copy of named function when linking (weak) |
| WeakODRLinkage |
Same, but only replaced by something equivalent. |
| AppendingLinkage |
Special purpose, only applies to global arrays. |
| InternalLinkage |
Rename collisions when linking (static functions). |
| PrivateLinkage |
Like Internal, but omit from symbol table. |
| LinkerPrivateLinkage |
Like Private, but linker removes. |
| LinkerPrivateWeakLinkage |
Like LinkerPrivate, but weak. |
| DLLImportLinkage |
Function to be imported from DLL. |
| DLLExportLinkage |
Function to be accessible from DLL. |
| ExternalWeakLinkage |
ExternalWeak linkage description. |
| CommonLinkage |
Tentative definitions. |
Definition at line 33 of file GlobalValue.h.
An enumeration for the kinds of visibility of global values.
| DefaultVisibility |
The GV is visible. |
| HiddenVisibility |
The GV is hidden. |
| ProtectedVisibility |
The GV is protected. |
Definition at line 53 of file GlobalValue.h.
| llvm::GlobalValue::GlobalValue | ( | Type * | ty, |
| ValueTy | vty, | ||
| Use * | Ops, | ||
| unsigned | NumOps, | ||
| LinkageTypes | linkage, | ||
| const Twine & | Name | ||
| ) | [inline, protected] |
Definition at line 60 of file GlobalValue.h.
References llvm::Value::setName().
| llvm::GlobalValue::~GlobalValue | ( | ) | [inline] |
Definition at line 76 of file GlobalValue.h.
References llvm::Constant::removeDeadConstantUsers().
Reimplemented from llvm::Constant.
Reimplemented in llvm::Function, llvm::GlobalVariable, and llvm::GlobalAlias.
Definition at line 300 of file GlobalValue.h.
References llvm::Value::FunctionVal, llvm::Value::getValueID(), llvm::Value::GlobalAliasVal, and llvm::Value::GlobalVariableVal.
| void GlobalValue::copyAttributesFrom | ( | const GlobalValue * | Src | ) | [virtual] |
copyAttributesFrom - copy all additional attributes (those not needed to create a GlobalValue) from the GlobalValue Src to this one.
Reimplemented in llvm::Function, and llvm::GlobalVariable.
Definition at line 51 of file Globals.cpp.
References getAlignment(), getSection(), getVisibility(), hasUnnamedAddr(), setAlignment(), setSection(), setUnnamedAddr(), and setVisibility().
Referenced by llvm::CloneModule(), and copyGVAttributes().
| void GlobalValue::Dematerialize | ( | ) |
Dematerialize - If this GlobalValue is read in, and if the GVMaterializer supports it, release the memory for the function, and set it up to be materialized lazily. If !isDematerializable(), this method is a noop.
Definition at line 39 of file Globals.cpp.
References llvm::Module::Dematerialize(), and getParent().
| void GlobalValue::destroyConstant | ( | ) | [virtual] |
Override from Constant class.
Override destroyConstant to make sure it doesn't get called on GlobalValue's because they shouldn't be treated like other constants.
Reimplemented from llvm::Constant.
Definition at line 45 of file Globals.cpp.
References llvm_unreachable.
| virtual void llvm::GlobalValue::eraseFromParent | ( | ) | [pure virtual] |
eraseFromParent - This method unlinks 'this' from the containing module and deletes it.
Implemented in llvm::Function, llvm::GlobalVariable, and llvm::GlobalAlias.
| unsigned llvm::GlobalValue::getAlignment | ( | ) | const [inline] |
Definition at line 80 of file GlobalValue.h.
References Alignment.
Referenced by llvm::ConstantFoldBinaryInstruction(), copyAttributesFrom(), copyGVAttributes(), getGVAlignmentLog2(), llvm::DataLayout::getPreferredAlignment(), llvm::SystemZSubtarget::isPC32DBLSymbol(), llvm::AArch64TargetLowering::LowerGlobalAddressELFSmall(), llvm::AssemblyWriter::printFunction(), llvm::AssemblyWriter::printGlobal(), setAlignment(), SRAGlobal(), and llvm::ObjectSizeOffsetVisitor::visitGlobalVariable().
| LinkageTypes llvm::GlobalValue::getLinkage | ( | ) | const [inline] |
Definition at line 228 of file GlobalValue.h.
References Linkage.
Referenced by llvm::CloneFunction(), llvm::AsmPrinter::EmitFunctionHeader(), llvm::AsmPrinter::EmitGlobalVariable(), getEncodedLinkage(), INITIALIZE_PASS(), InstallGlobalCtors(), llvm::AssemblyWriter::printAlias(), llvm::AssemblyWriter::printFunction(), llvm::AssemblyWriter::printGlobal(), and UpgradeIntrinsicFunction1().
| static LinkageTypes llvm::GlobalValue::getLinkOnceLinkage | ( | bool | ODR | ) | [inline, static] |
Definition at line 112 of file GlobalValue.h.
References LinkOnceAnyLinkage, and LinkOnceODRLinkage.
| Module* llvm::GlobalValue::getParent | ( | ) | [inline] |
getParent - Get the module that this global value is contained inside of...
Definition at line 296 of file GlobalValue.h.
References Parent.
Referenced by changeToUnreachable(), llvm::IRBuilderBase::CreateGlobalString(), llvm::IRBuilderBase::CreateLifetimeEnd(), llvm::IRBuilderBase::CreateLifetimeStart(), llvm::IRBuilderBase::CreateMemCpy(), llvm::IRBuilderBase::CreateMemMove(), llvm::IRBuilderBase::CreateMemSet(), Dematerialize(), llvm::EmitFPutC(), llvm::EmitFPutS(), llvm::AsmPrinter::EmitFunctionHeader(), llvm::EmitFWrite(), llvm::AsmPrinter::EmitGlobalVariable(), llvm::EmitMemChr(), llvm::EmitMemCmp(), llvm::EmitMemCpyChk(), llvm::EmitPutChar(), llvm::EmitPutS(), llvm::EmitStrChr(), llvm::EmitStrCpy(), llvm::EmitStrLen(), llvm::EmitStrNCmp(), llvm::EmitStrNCpy(), llvm::EmitStrNLen(), llvm::EmitUnaryFloatFnCall(), llvm::GlobalAlias::eraseFromParent(), llvm::GlobalVariable::eraseFromParent(), llvm::Function::eraseFromParent(), llvm::CodeExtractor::extractCodeRegion(), llvm::findAllNVVMAnnotation(), llvm::findOneNVVMAnnotation(), forceRenaming(), GenerateARCBBEntranceAnnotation(), GenerateARCBBTerminatorAnnotation(), generateUnsignedDivisionCode(), llvm::CallSiteBase< Function, Value, User, Instruction, CallInst, InvokeInst, User::op_iterator >::getCaller(), llvm::GCModuleInfo::getFunctionInfo(), llvm::Trace::getModule(), getModuleFromVal(), llvm::CallGraph::getOrInsertFunction(), getParent(), llvm::SparcTargetLowering::getSRetArgSize(), llvm::GlobalVariable::GlobalVariable(), HandleByValArgument(), INITIALIZE_PASS(), llvm::InlineFunction(), llvm::InsertProfilingInitCall(), InstallGlobalCtors(), isDematerializable(), llvm::isImageReadOnly(), llvm::isImageWriteOnly(), llvm::BlackList::isIn(), llvm::BlackList::isInInit(), isMaterializable(), llvm::isSampler(), llvm::lintFunction(), LLVMGetNextFunction(), LLVMGetNextGlobal(), LLVMGetPreviousFunction(), LLVMGetPreviousGlobal(), nvptx::LowerConstant(), lowerConstant(), llvm::LowerDbgDeclare(), llvm::IntrinsicLowering::LowerToByteSwap(), Materialize(), OptimizeGlobalAddressOfMalloc(), PerformHeapAllocSRoA(), llvm::Value::print(), llvm::AssemblyWriter::printFunction(), llvm::AssemblyWriter::printGlobal(), PrintOps(), ProcessUAddIdiom(), ProcessUGT_ADDCST_ADD(), llvm::GlobalAlias::removeFromParent(), llvm::GlobalVariable::removeFromParent(), llvm::Function::removeFromParent(), ReplaceCallWith(), llvm::JIT::runFunction(), llvm::NVPTXLowerAggrCopies::runOnFunction(), setUsedInitializer(), SRAGlobal(), SwitchToLookupTable(), TryToShrinkGlobalToBoolean(), llvm::UpgradeIntrinsicCall(), UpgradeIntrinsicFunction1(), UpgradeSSE41Function(), usedInOneFunc(), llvm::verifyFunction(), llvm::InstCombiner::visitCallInst(), and llvm::InstCombiner::visitFPTrunc().
| const Module* llvm::GlobalValue::getParent | ( | ) | const [inline] |
Definition at line 297 of file GlobalValue.h.
References Parent.
getRealLinkageName - If special LLVM prefix that is used to inform the asm printer to not emit usual symbol prefix before the symbol name is used then return linkage name after skipping this special LLVM prefix.
Definition at line 245 of file GlobalValue.h.
References llvm::StringRef::empty(), and llvm::StringRef::substr().
Referenced by llvm::CompileUnit::createGlobalVariableDIE(), fixupSubprogramName(), and llvm::CompileUnit::getOrCreateSubprogramDIE().
| const std::string& llvm::GlobalValue::getSection | ( | ) | const [inline] |
Definition at line 97 of file GlobalValue.h.
References Section.
Referenced by copyAttributesFrom(), llvm::AsmPrinter::EmitSpecialLLVMGlobal(), llvm::TargetLoweringObjectFileELF::getExplicitSectionGlobal(), llvm::TargetLoweringObjectFileMachO::getExplicitSectionGlobal(), llvm::TargetLoweringObjectFileCOFF::getExplicitSectionGlobal(), isSuitableForBSS(), llvm::AssemblyWriter::printFunction(), and llvm::AssemblyWriter::printGlobal().
| PointerType* llvm::GlobalValue::getType | ( | ) | const [inline] |
getType - Global values are always pointers.
Reimplemented from llvm::Value.
Definition at line 108 of file GlobalValue.h.
Referenced by llvm::Interpreter::callExternalFunction(), canDemoteGlobalVar(), llvm::BlockAddress::destroyConstant(), llvm::ExecutionEngine::emitGlobals(), llvm::AsmPrinter::EmitGlobalVariable(), llvm::ExecutionEngine::EmitGlobalVariable(), llvm::GlobalAddressSDNode::getAddressSpace(), llvm::Function::getContext(), llvm::Function::getFunctionType(), llvm::SelectionDAG::getGlobalAddress(), llvm::GetGVTypeString(), llvm::JIT::getMemoryForGV(), llvm::Module::getOrInsertFunction(), llvm::Module::getOrInsertGlobal(), llvm::DataLayout::getPreferredAlignment(), INITIALIZE_PASS(), llvm::InsertProfilingInitCall(), llvm::InsertProfilingShutdownCall(), InstallGlobalCtors(), llvm::HexagonTargetObjectFile::IsGlobalInSmallSection(), llvm::MBlazeTargetObjectFile::IsGlobalInSmallSection(), llvm::MipsTargetObjectFile::IsGlobalInSmallSection(), isLeakCheckerRoot(), OptimizeGlobalAddressOfMalloc(), llvm::AssemblyWriter::printAlias(), llvm::AssemblyWriter::printGlobal(), llvm::GlobalAlias::setAliasee(), llvm::GlobalVariable::setInitializer(), SRAGlobal(), TryToShrinkGlobalToBoolean(), and llvm::ObjectSizeOffsetVisitor::visitGlobalVariable().
| VisibilityTypes llvm::GlobalValue::getVisibility | ( | ) | const [inline] |
Definition at line 88 of file GlobalValue.h.
References Visibility.
Referenced by copyAttributesFrom(), llvm::AsmPrinter::doFinalization(), llvm::AsmPrinter::EmitFunctionHeader(), llvm::AsmPrinter::EmitGlobalVariable(), getEncodedVisibility(), llvm::AssemblyWriter::printAlias(), llvm::AssemblyWriter::printFunction(), and llvm::AssemblyWriter::printGlobal().
| static LinkageTypes llvm::GlobalValue::getWeakLinkage | ( | bool | ODR | ) | [inline, static] |
Definition at line 115 of file GlobalValue.h.
References WeakAnyLinkage, and WeakODRLinkage.
| bool llvm::GlobalValue::hasAppendingLinkage | ( | ) | const [inline] |
Definition at line 214 of file GlobalValue.h.
References isAppendingLinkage(), and Linkage.
Referenced by llvm::ExecutionEngine::emitGlobals(), and llvm::AsmPrinter::EmitSpecialLLVMGlobal().
| bool llvm::GlobalValue::hasAvailableExternallyLinkage | ( | ) | const [inline] |
Definition at line 202 of file GlobalValue.h.
References isAvailableExternallyLinkage(), and Linkage.
Referenced by llvm::X86Subtarget::ClassifyGlobalReference(), llvm::AsmPrinter::EmitSpecialLLVMGlobal(), llvm::TargetLoweringObjectFile::getKindForGlobal(), llvm::JIT::getOrEmitGlobalVariable(), llvm::MCJIT::getPointerToFunction(), llvm::JIT::getPointerToFunction(), llvm::ARMSubtarget::GVIsIndirectSymbol(), llvm::Function::isDefTriviallyDead(), llvm::HexagonTargetObjectFile::IsGlobalInSmallSection(), llvm::MBlazeTargetObjectFile::IsGlobalInSmallSection(), and llvm::MipsTargetObjectFile::IsGlobalInSmallSection().
| bool llvm::GlobalValue::hasCommonLinkage | ( | ) | const [inline] |
Definition at line 225 of file GlobalValue.h.
References isCommonLinkage(), and Linkage.
Referenced by llvm::X86Subtarget::ClassifyGlobalReference(), llvm::TargetLoweringObjectFile::getKindForGlobal(), llvm::ARMSubtarget::GVIsIndirectSymbol(), and llvm::PPCSubtarget::hasLazyResolverStub().
| bool llvm::GlobalValue::hasDefaultVisibility | ( | ) | const [inline] |
Definition at line 89 of file GlobalValue.h.
References DefaultVisibility, and Visibility.
Referenced by bindsLocally(), and llvm::X86Subtarget::ClassifyGlobalReference().
| bool llvm::GlobalValue::hasDLLExportLinkage | ( | ) | const [inline] |
Definition at line 223 of file GlobalValue.h.
References isDLLExportLinkage(), and Linkage.
Referenced by llvm::ExecutionEngine::emitGlobals().
| bool llvm::GlobalValue::hasDLLImportLinkage | ( | ) | const [inline] |
Definition at line 222 of file GlobalValue.h.
References isDLLImportLinkage(), and Linkage.
Referenced by llvm::X86Subtarget::ClassifyGlobalReference(), and llvm::ExecutionEngine::emitGlobals().
| bool llvm::GlobalValue::hasExternalLinkage | ( | ) | const [inline] |
Definition at line 201 of file GlobalValue.h.
References isExternalLinkage(), and Linkage.
Referenced by llvm::ExecutionEngine::emitGlobals(), llvm::TargetLoweringObjectFile::getKindForGlobal(), llvm::AssemblyWriter::printGlobal(), and llvm::TargetLoweringObjectFileMachO::SelectSectionForGlobal().
| bool llvm::GlobalValue::hasExternalWeakLinkage | ( | ) | const [inline] |
Definition at line 224 of file GlobalValue.h.
References isExternalWeakLinkage(), and Linkage.
Referenced by llvm::ExecutionEngine::emitGlobals(), llvm::MCJIT::getPointerToFunction(), and llvm::JIT::getPointerToFunction().
| bool llvm::GlobalValue::hasHiddenVisibility | ( | ) | const [inline] |
Definition at line 90 of file GlobalValue.h.
References HiddenVisibility, and Visibility.
Referenced by llvm::X86Subtarget::ClassifyGlobalReference(), llvm::TargetMachine::getTLSModel(), llvm::TargetLoweringObjectFileMachO::getTTypeGlobalReference(), llvm::AArch64Subtarget::GVIsIndirectSymbol(), llvm::ARMSubtarget::GVIsIndirectSymbol(), and llvm::PPCSubtarget::hasLazyResolverStub().
| bool llvm::GlobalValue::hasInternalLinkage | ( | ) | const [inline] |
Definition at line 215 of file GlobalValue.h.
References isInternalLinkage(), and Linkage.
Referenced by canDemoteGlobalVar(), GetSymbolFromOperand(), llvm::X86AsmPrinter::printSymbolOperand(), and llvm::X86AsmPrinter::runOnMachineFunction().
| bool llvm::GlobalValue::hasLinkerPrivateLinkage | ( | ) | const [inline] |
Definition at line 217 of file GlobalValue.h.
References isLinkerPrivateLinkage(), and Linkage.
Referenced by llvm::Mangler::getNameWithPrefix().
| bool llvm::GlobalValue::hasLinkerPrivateWeakLinkage | ( | ) | const [inline] |
Definition at line 218 of file GlobalValue.h.
References isLinkerPrivateWeakLinkage(), and Linkage.
Referenced by llvm::Mangler::getNameWithPrefix().
| bool llvm::GlobalValue::hasLinkOnceLinkage | ( | ) | const [inline] |
Definition at line 205 of file GlobalValue.h.
References isLinkOnceLinkage(), and Linkage.
Referenced by llvm::AsmPrinter::EmitFunctionHeader(), llvm::PPCSubtarget::hasLazyResolverStub(), and llvm::Function::isDefTriviallyDead().
| bool llvm::GlobalValue::hasLinkOnceODRAutoHideLinkage | ( | ) | const [inline] |
Definition at line 208 of file GlobalValue.h.
References isLinkOnceODRAutoHideLinkage(), and Linkage.
| bool llvm::GlobalValue::hasLocalLinkage | ( | ) | const [inline] |
Definition at line 221 of file GlobalValue.h.
References isLocalLinkage(), and Linkage.
Referenced by bindsLocally(), llvm::X86Subtarget::ClassifyGlobalReference(), llvm::ExecutionEngine::emitGlobals(), forceRenaming(), llvm::TargetLoweringObjectFileMachO::getCFIPersonalitySymbol(), llvm::TargetLoweringObjectFile::getKindForGlobal(), llvm::Module::getOrInsertFunction(), llvm::TargetMachine::getTLSModel(), llvm::TargetLoweringObjectFileELF::getTTypeGlobalReference(), llvm::TargetLoweringObjectFileMachO::getTTypeGlobalReference(), llvm::AArch64Subtarget::GVIsIndirectSymbol(), llvm::ARMSubtarget::GVIsIndirectSymbol(), hasUsesToReplace(), IsBetterCannonical(), llvm::Function::isDefTriviallyDead(), mayHaveOtherReferences(), llvm::Inliner::runOnSCC(), llvm::ExecutionEngine::runStaticConstructorsDestructors(), llvm::FastISel::SelectInstruction(), llvm::TargetLoweringObjectFileMachO::shouldEmitUsedDirectiveFor(), and SRAGlobal().
| bool llvm::GlobalValue::hasPrivateLinkage | ( | ) | const [inline] |
Definition at line 216 of file GlobalValue.h.
References isPrivateLinkage(), and Linkage.
Referenced by llvm::Mangler::getNameWithPrefix(), and isLeakCheckerRoot().
| bool llvm::GlobalValue::hasProtectedVisibility | ( | ) | const [inline] |
Definition at line 91 of file GlobalValue.h.
References ProtectedVisibility, and Visibility.
| bool llvm::GlobalValue::hasSection | ( | ) | const [inline] |
Definition at line 96 of file GlobalValue.h.
References Section.
Referenced by getGVAlignmentLog2(), llvm::AssemblyWriter::printFunction(), llvm::AssemblyWriter::printGlobal(), and llvm::TargetLoweringObjectFile::SectionForGlobal().
| bool llvm::GlobalValue::hasUnnamedAddr | ( | ) | const [inline] |
Definition at line 85 of file GlobalValue.h.
References UnnamedAddr.
Referenced by copyAttributesFrom(), llvm::TargetLoweringObjectFile::getKindForGlobal(), IsBetterCannonical(), llvm::AssemblyWriter::printFunction(), and llvm::AssemblyWriter::printGlobal().
| bool llvm::GlobalValue::hasWeakLinkage | ( | ) | const [inline] |
Definition at line 211 of file GlobalValue.h.
References isWeakLinkage(), and Linkage.
Referenced by llvm::AsmPrinter::EmitFunctionHeader(), and llvm::PPCSubtarget::hasLazyResolverStub().
| static bool llvm::GlobalValue::isAppendingLinkage | ( | LinkageTypes | Linkage | ) | [inline, static] |
Definition at line 136 of file GlobalValue.h.
References AppendingLinkage.
Referenced by hasAppendingLinkage().
| static bool llvm::GlobalValue::isAvailableExternallyLinkage | ( | LinkageTypes | Linkage | ) | [inline, static] |
Definition at line 122 of file GlobalValue.h.
References AvailableExternallyLinkage.
Referenced by hasAvailableExternallyLinkage().
| static bool llvm::GlobalValue::isCommonLinkage | ( | LinkageTypes | Linkage | ) | [inline, static] |
Definition at line 164 of file GlobalValue.h.
References CommonLinkage.
Referenced by hasCommonLinkage().
| bool GlobalValue::isDeclaration | ( | ) | const |
isDeclaration - Return true if the primary definition of this global value is outside of the current translation unit.
Definition at line 66 of file Globals.cpp.
References F().
Referenced by assureFPCallStub(), llvm::Interpreter::callFunction(), llvm::X86Subtarget::ClassifyGlobalReference(), cxxDtorIsEmpty(), llvm::AsmPrinter::doFinalization(), llvm::ExecutionEngine::emitGlobals(), llvm::AsmPrinter::EmitGlobalVariable(), getCalledFunction(), llvm::ProfileInfoT< FType, BType >::getExecutionCount(), llvm::GCModuleInfo::getFunctionInfo(), llvm::Inliner::getInlineThreshold(), llvm::TargetLoweringObjectFile::getKindForGlobal(), llvm::JIT::getOrEmitGlobalVariable(), llvm::MCJIT::getPointerToFunction(), llvm::JIT::getPointerToFunction(), llvm::TargetMachine::getTLSModel(), llvm::ARMSubtarget::GVIsIndirectSymbol(), llvm::GlobalVariable::hasInitializer(), llvm::PPCSubtarget::hasLazyResolverStub(), INITIALIZE_PASS(), llvm::InlineFunction(), llvm::BitcodeReader::isDematerializable(), llvm::isFreeCall(), llvm::HexagonTargetObjectFile::IsGlobalInSmallSection(), llvm::MBlazeTargetObjectFile::IsGlobalInSmallSection(), llvm::MipsTargetObjectFile::IsGlobalInSmallSection(), llvm::BitcodeReader::isMaterializable(), isNonGhostDeclaration(), llvm::TargetLowering::isOffsetFoldingLegal(), llvm::lintFunction(), llvm::AssemblyWriter::printFunction(), llvm::Inliner::removeDeadFunctions(), llvm::FPPassManager::runOnFunction(), llvm::Mips16HardFloat::runOnModule(), llvm::Inliner::runOnSCC(), llvm::ExecutionEngine::runStaticConstructorsDestructors(), llvm::verifyFunction(), and llvm::Interpreter::visitCallSite().
| bool GlobalValue::isDematerializable | ( | ) | const |
isDematerializable - Returns true if this function was loaded from a GVMaterializer that's still attached to its Module and that knows how to dematerialize the function.
Definition at line 33 of file Globals.cpp.
References getParent(), and llvm::Module::isDematerializable().
| static bool llvm::GlobalValue::isDiscardableIfUnused | ( | LinkageTypes | Linkage | ) | [inline, static] |
isDiscardableIfUnused - Whether the definition of this global may be discarded if it is not used in its compilation unit.
Definition at line 170 of file GlobalValue.h.
References isLinkOnceLinkage(), and isLocalLinkage().
| bool llvm::GlobalValue::isDiscardableIfUnused | ( | ) | const [inline] |
Definition at line 230 of file GlobalValue.h.
References Linkage.
| static bool llvm::GlobalValue::isDLLExportLinkage | ( | LinkageTypes | Linkage | ) | [inline, static] |
Definition at line 158 of file GlobalValue.h.
References DLLExportLinkage.
Referenced by hasDLLExportLinkage().
| static bool llvm::GlobalValue::isDLLImportLinkage | ( | LinkageTypes | Linkage | ) | [inline, static] |
Definition at line 155 of file GlobalValue.h.
References DLLImportLinkage.
Referenced by hasDLLImportLinkage().
| static bool llvm::GlobalValue::isExternalLinkage | ( | LinkageTypes | Linkage | ) | [inline, static] |
Definition at line 119 of file GlobalValue.h.
References ExternalLinkage.
Referenced by hasExternalLinkage().
| static bool llvm::GlobalValue::isExternalWeakLinkage | ( | LinkageTypes | Linkage | ) | [inline, static] |
Definition at line 161 of file GlobalValue.h.
References ExternalWeakLinkage.
Referenced by hasExternalWeakLinkage().
| static bool llvm::GlobalValue::isInternalLinkage | ( | LinkageTypes | Linkage | ) | [inline, static] |
Definition at line 139 of file GlobalValue.h.
References InternalLinkage.
Referenced by hasInternalLinkage(), and isLocalLinkage().
| static bool llvm::GlobalValue::isLinkerPrivateLinkage | ( | LinkageTypes | Linkage | ) | [inline, static] |
Definition at line 145 of file GlobalValue.h.
References LinkerPrivateLinkage.
Referenced by hasLinkerPrivateLinkage(), and isLocalLinkage().
| static bool llvm::GlobalValue::isLinkerPrivateWeakLinkage | ( | LinkageTypes | Linkage | ) | [inline, static] |
Definition at line 148 of file GlobalValue.h.
References LinkerPrivateWeakLinkage.
Referenced by hasLinkerPrivateWeakLinkage(), and isLocalLinkage().
| static bool llvm::GlobalValue::isLinkOnceLinkage | ( | LinkageTypes | Linkage | ) | [inline, static] |
Definition at line 125 of file GlobalValue.h.
References LinkOnceAnyLinkage, LinkOnceODRAutoHideLinkage, and LinkOnceODRLinkage.
Referenced by hasLinkOnceLinkage(), and isDiscardableIfUnused().
| static bool llvm::GlobalValue::isLinkOnceODRAutoHideLinkage | ( | LinkageTypes | Linkage | ) | [inline, static] |
Definition at line 130 of file GlobalValue.h.
References LinkOnceODRAutoHideLinkage.
Referenced by hasLinkOnceODRAutoHideLinkage().
| static bool llvm::GlobalValue::isLocalLinkage | ( | LinkageTypes | Linkage | ) | [inline, static] |
Definition at line 151 of file GlobalValue.h.
References isInternalLinkage(), isLinkerPrivateLinkage(), isLinkerPrivateWeakLinkage(), and isPrivateLinkage().
Referenced by hasLocalLinkage(), and isDiscardableIfUnused().
| bool GlobalValue::isMaterializable | ( | ) | const |
isMaterializable - If this function's Module is being lazily streamed in functions from disk or some other source, this method can be used to check to see if the function has been read in yet or not.
Definition at line 30 of file Globals.cpp.
References getParent(), and llvm::Module::isMaterializable().
Referenced by llvm::X86Subtarget::ClassifyGlobalReference(), llvm::ARMSubtarget::GVIsIndirectSymbol(), llvm::PPCSubtarget::hasLazyResolverStub(), isNonGhostDeclaration(), llvm::BitcodeReader::Materialize(), llvm::BitcodeReader::MaterializeModule(), llvm::AssemblyWriter::printAlias(), llvm::AssemblyWriter::printFunction(), llvm::AssemblyWriter::printGlobal(), and llvm::FunctionPassManager::run().
| static bool llvm::GlobalValue::isPrivateLinkage | ( | LinkageTypes | Linkage | ) | [inline, static] |
Definition at line 142 of file GlobalValue.h.
References PrivateLinkage.
Referenced by hasPrivateLinkage(), and isLocalLinkage().
| static bool llvm::GlobalValue::isWeakForLinker | ( | LinkageTypes | Linkage | ) | [inline, static] |
isWeakForLinker - Whether the definition of this global may be replaced at link time. NB: Using this method outside of the code generators is almost always a mistake: when working at the IR level use mayBeOverridden instead as it knows about ODR semantics.
Definition at line 189 of file GlobalValue.h.
References AvailableExternallyLinkage, CommonLinkage, ExternalWeakLinkage, LinkerPrivateWeakLinkage, LinkOnceAnyLinkage, LinkOnceODRAutoHideLinkage, LinkOnceODRLinkage, WeakAnyLinkage, and WeakODRLinkage.
Referenced by llvm::X86Subtarget::ClassifyGlobalReference(), llvm::AsmPrinter::EmitJumpTableInfo(), llvm::TargetLoweringObjectFileCOFF::getExplicitSectionGlobal(), llvm::ARMSubtarget::GVIsIndirectSymbol(), llvm::TargetLowering::isOffsetFoldingLegal(), llvm::TargetLoweringObjectFileELF::SelectSectionForGlobal(), llvm::TargetLoweringObjectFileMachO::SelectSectionForGlobal(), and llvm::TargetLoweringObjectFileCOFF::SelectSectionForGlobal().
| bool llvm::GlobalValue::isWeakForLinker | ( | ) | const [inline] |
Definition at line 236 of file GlobalValue.h.
References isWeakForLinker(), and Linkage.
Referenced by llvm::GlobalVariable::hasUniqueInitializer(), and isWeakForLinker().
| static bool llvm::GlobalValue::isWeakLinkage | ( | LinkageTypes | Linkage | ) | [inline, static] |
Definition at line 133 of file GlobalValue.h.
References WeakAnyLinkage, and WeakODRLinkage.
Referenced by hasWeakLinkage().
| bool GlobalValue::Materialize | ( | std::string * | ErrInfo = 0 | ) |
Materialize - make sure this GlobalValue is fully read. If the module is corrupt, this returns true and fills in the optional string with information about the problem. If successful, this returns false.
Definition at line 36 of file Globals.cpp.
References getParent(), and llvm::Module::Materialize().
Referenced by llvm::JIT::getPointerToFunction(), llvm::BitcodeReader::materializeForwardReferencedFunctions(), and llvm::FunctionPassManager::run().
| static bool llvm::GlobalValue::mayBeOverridden | ( | LinkageTypes | Linkage | ) | [inline, static] |
mayBeOverridden - Whether the definition of this global may be replaced by something non-equivalent at link time. For example, if a function has weak linkage then the code defining it may be replaced by different code.
Definition at line 177 of file GlobalValue.h.
References CommonLinkage, ExternalWeakLinkage, LinkerPrivateWeakLinkage, LinkOnceAnyLinkage, and WeakAnyLinkage.
Referenced by llvm::InlineCostAnalysis::getInlineCost(), and llvm::ObjectSizeOffsetVisitor::visitGlobalAlias().
| bool llvm::GlobalValue::mayBeOverridden | ( | ) | const [inline] |
Definition at line 234 of file GlobalValue.h.
References Linkage, and mayBeOverridden().
Referenced by llvm::GlobalVariable::hasDefinitiveInitializer(), mayBeOverridden(), and llvm::GlobalAlias::resolveAliasedGlobal().
| virtual void llvm::GlobalValue::removeFromParent | ( | ) | [pure virtual] |
removeFromParent - This method unlinks 'this' from the containing module, but does not delete it.
Implemented in llvm::Function, llvm::GlobalVariable, and llvm::GlobalAlias.
| void GlobalValue::setAlignment | ( | unsigned | Align | ) |
Definition at line 58 of file Globals.cpp.
References Alignment, getAlignment(), and llvm::Log2_32().
Referenced by copyAttributesFrom(), copyGVAttributes(), and SRAGlobal().
| void llvm::GlobalValue::setLinkage | ( | LinkageTypes | LT | ) | [inline] |
Definition at line 227 of file GlobalValue.h.
References Linkage, and llvm::A64CC::LT.
Referenced by llvm::Function::deleteBody(), and LLVMSetLinkage().
| void llvm::GlobalValue::setSection | ( | StringRef | S | ) | [inline] |
Definition at line 98 of file GlobalValue.h.
References Section.
Referenced by assureFPCallStub(), copyAttributesFrom(), createFPFnStub(), and setUsedInitializer().
| void llvm::GlobalValue::setUnnamedAddr | ( | bool | Val | ) | [inline] |
Definition at line 86 of file GlobalValue.h.
References UnnamedAddr.
Referenced by copyAttributesFrom(), llvm::IRBuilderBase::CreateGlobalString(), and createPrivateGlobalForString().
| void llvm::GlobalValue::setVisibility | ( | VisibilityTypes | V | ) | [inline] |
Definition at line 94 of file GlobalValue.h.
References Visibility.
Referenced by copyAttributesFrom().
| bool llvm::GlobalValue::use_empty_except_constants | ( | ) |
Determine if the usage of this global value is empty except for transitively dead constants.
If the usage is empty (except transitively dead constants), then this global value can be safely deleted since the destructor will delete the dead constants as well.
unsigned llvm::GlobalValue::Alignment [protected] |
Definition at line 71 of file GlobalValue.h.
Referenced by getAlignment(), and setAlignment().
LinkageTypes llvm::GlobalValue::Linkage [protected] |
Definition at line 69 of file GlobalValue.h.
Referenced by getLinkage(), hasAppendingLinkage(), hasAvailableExternallyLinkage(), hasCommonLinkage(), hasDLLExportLinkage(), hasDLLImportLinkage(), hasExternalLinkage(), hasExternalWeakLinkage(), hasInternalLinkage(), hasLinkerPrivateLinkage(), hasLinkerPrivateWeakLinkage(), hasLinkOnceLinkage(), hasLinkOnceODRAutoHideLinkage(), hasLocalLinkage(), hasPrivateLinkage(), hasWeakLinkage(), isDiscardableIfUnused(), isWeakForLinker(), mayBeOverridden(), and setLinkage().
Module* llvm::GlobalValue::Parent [protected] |
Definition at line 73 of file GlobalValue.h.
Referenced by getParent().
std::string llvm::GlobalValue::Section [protected] |
Definition at line 74 of file GlobalValue.h.
Referenced by getSection(), hasSection(), and setSection().
unsigned llvm::GlobalValue::UnnamedAddr [protected] |
Definition at line 72 of file GlobalValue.h.
Referenced by hasUnnamedAddr(), and setUnnamedAddr().
unsigned llvm::GlobalValue::Visibility [protected] |
Definition at line 70 of file GlobalValue.h.
Referenced by getVisibility(), hasDefaultVisibility(), hasHiddenVisibility(), hasProtectedVisibility(), and setVisibility().