LLVM API Documentation
#include <GlobalValue.h>
Inheritance diagram for llvm::GlobalValue:


Public Types | |
| enum | LinkageTypes { ExternalLinkage = 0, LinkOnceLinkage, WeakLinkage, AppendingLinkage, InternalLinkage, DLLImportLinkage, DLLExportLinkage, ExternalWeakLinkage, GhostLinkage, CommonLinkage } |
| An enumeration for the kinds of linkage for global values. More... | |
| enum | VisibilityTypes { DefaultVisibility = 0, HiddenVisibility, ProtectedVisibility } |
| An enumeration for the kinds of visibility of global values. More... | |
Public Member Functions | |
| ~GlobalValue () | |
| unsigned | getAlignment () const |
| void | setAlignment (unsigned Align) |
| VisibilityTypes | getVisibility () const |
| bool | hasHiddenVisibility () const |
| bool | hasProtectedVisibility () const |
| void | setVisibility (VisibilityTypes V) |
| bool | hasSection () const |
| const std::string & | getSection () const |
| void | setSection (const std::string &S) |
| bool | use_empty_except_constants () |
| Determine if the usage of this global value is empty except for transitively dead constants. | |
| const PointerType * | getType () const |
| getType - Global values are always pointers. | |
| bool | hasExternalLinkage () const |
| bool | hasLinkOnceLinkage () const |
| bool | hasWeakLinkage () const |
| bool | hasCommonLinkage () const |
| bool | hasAppendingLinkage () const |
| bool | hasInternalLinkage () const |
| bool | hasDLLImportLinkage () const |
| bool | hasDLLExportLinkage () const |
| bool | hasExternalWeakLinkage () const |
| bool | hasGhostLinkage () const |
| void | setLinkage (LinkageTypes LT) |
| LinkageTypes | getLinkage () const |
| bool | isWeakForLinker () const |
| virtual void | copyAttributesFrom (const GlobalValue *Src) |
| bool | hasNotBeenReadFromBitcode () const |
| virtual bool | isNullValue () const |
| virtual void | destroyConstant () |
| Override from Constant class. | |
| virtual bool | isDeclaration () const =0 |
| Module * | getParent () |
| const Module * | getParent () const |
| void | removeDeadConstantUsers () |
Static Public Member Functions | |
| bool | classof (const GlobalValue *) |
| bool | classof (const Value *V) |
Protected Member Functions | |
| GlobalValue (const Type *ty, ValueTy vty, Use *Ops, unsigned NumOps, LinkageTypes linkage, const std::string &name="") | |
Protected Attributes | |
| Module * | Parent |
| LinkageTypes | Linkage: 5 |
| unsigned | Visibility: 2 |
| unsigned | Alignment: 16 |
| std::string | Section |
|
|
An enumeration for the kinds of linkage for global values.
Definition at line 32 of file GlobalValue.h. |
|
|
An enumeration for the kinds of visibility of global values.
Definition at line 46 of file GlobalValue.h. |
|
||||||||||||||||||||||||||||
|
Definition at line 53 of file GlobalValue.h. |
|
|
Definition at line 68 of file GlobalValue.h. |
|
|
Reimplemented from llvm::Constant. Reimplemented in llvm::Function, llvm::GlobalAlias, and llvm::GlobalVariable. Definition at line 158 of file GlobalValue.h. References llvm::Value::getValueID(). |
|
|
Reimplemented from llvm::Constant. Definition at line 157 of file GlobalValue.h. |
|
|
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 85 of file Globals.cpp. References getAlignment(), getSection(), getVisibility(), setAlignment(), setSection(), and setVisibility(). Referenced by llvm::GlobalVariable::copyAttributesFrom(), llvm::Function::copyAttributesFrom(), and CopyGVAttributes(). |
|
|
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 78 of file Globals.cpp. |
|
|
|
|
Definition at line 148 of file GlobalValue.h. |
|
|
|
|
|
|
Definition at line 105 of file GlobalValue.h. Referenced by llvm::ExecutionEngine::emitGlobals(), llvm::AsmPrinter::EmitSpecialLLVMGlobal(), getGlobalVariableClass(), GetLinkageResult(), LinkGlobalInits(), LinkGlobals(), and Verifier::visitGlobalValue(). |
|
|
|
Definition at line 108 of file GlobalValue.h. Referenced by llvm::ExecutionEngine::emitGlobals(), GetLinkageResult(), and llvm::X86ATTAsmPrinter::runOnMachineFunction(). |
|
|
|
|
|
Definition at line 110 of file GlobalValue.h. Referenced by Verifier::visitGlobalValue(). |
|
|
|
|
|
hasNotBeenReadFromBitcode - If a module provider is being used to lazily stream in functions from disk, this method can be used to check to see if the function has been read in yet or not. Unless you are working on the JIT or something else that streams stuff in lazily, you don't need to worry about this. Definition at line 132 of file GlobalValue.h. Referenced by llvm::BitcodeReader::dematerializeFunction(), JITResolver::getFunctionStub(), llvm::JIT::getPointerToFunction(), GVIsIndirectSymbol(), llvm::X86Subtarget::GVRequiresExtraLoad(), llvm::PPCSubtarget::hasLazyResolverStub(), llvm::BitcodeReader::materializeFunction(), and llvm::BitcodeReader::materializeModule(). |
|
|
Definition at line 80 of file GlobalValue.h. Referenced by llvm::X86TargetLowering::IsEligibleForTailCallOptimization(), llvm::PPCTargetLowering::IsEligibleForTailCallOptimization(), and llvm::X86ATTAsmPrinter::printOperand(). |
|
|
|
|
isDeclaration - Return true if the primary definition of this global value is outside of the current translation unit... Implemented in llvm::Function, llvm::GlobalAlias, and llvm::GlobalVariable. Referenced by llvm::ExecutionEngine::emitGlobals(), EnforceKnownAlignment(), GetLinkageResult(), GVIsIndirectSymbol(), llvm::X86Subtarget::GVRequiresExtraLoad(), llvm::PPCSubtarget::hasLazyResolverStub(), InsertName(), llvm::GlobalAlias::isDeclaration(), LinkFunctionProtos(), LinkGlobals(), LowerCALL(), LowerToTLSExecModel(), PPCAsmPrinter::printCallOperand(), SPUAsmPrinter::printOp(), PPCAsmPrinter::printOp(), IA64AsmPrinter::printOp(), AlphaAsmPrinter::printOp(), llvm::X86ATTAsmPrinter::printOperand(), ARMAsmPrinter::printOperand(), ResolveAliases(), and Verifier::visitGlobalValue(). |
|
|
Override from Constant class. No GlobalValue's are null values so this always returns false. Implements llvm::Constant. Definition at line 136 of file GlobalValue.h. |
|
|
isWeakForLinker - Determines if symbol is weak for linker having weak or linkonce or common or extweak LLVM linkage. Definition at line 116 of file GlobalValue.h. Referenced by GetLinkageResult(), LinkAlias(), LinkGlobalInits(), llvm::X86ATTAsmPrinter::printModuleLevelGV(), SparcAsmPrinter::printModuleLevelGV(), PPCDarwinAsmPrinter::printModuleLevelGV(), PPCLinuxAsmPrinter::printModuleLevelGV(), MipsAsmPrinter::printModuleLevelGV(), IA64AsmPrinter::printModuleLevelGV(), ARMAsmPrinter::printModuleLevelGV(), llvm::X86ATTAsmPrinter::printOperand(), llvm::TargetAsmInfo::SectionFlagsForGlobal(), llvm::TargetAsmInfo::SelectSectionForGlobal(), llvm::MipsTargetAsmInfo::SelectSectionForGlobal(), llvm::ELFTargetAsmInfo::SelectSectionForGlobal(), and llvm::DarwinTargetAsmInfo::SelectSectionForGlobal(). |
|
|
removeDeadConstantUsers - If there are any dead constant users dangling off of this global value, remove them. This method is useful for clients that want to check to see if a global is unused, but don't want to deal with potentially dead constants hanging off of the globals. Definition at line 49 of file Globals.cpp. References removeDeadUsersOfConstant(), llvm::Value::use_begin(), llvm::Value::use_end(), and llvm::Value::use_iterator. Referenced by AddressIsTaken(), llvm::Inliner::doFinalization(), and ConstantMerge::runOnModule(). |
|
|
Definition at line 73 of file GlobalValue.h. Referenced by copyAttributesFrom(), CopyGVAttributes(), EnforceKnownAlignment(), LinkGlobals(), and SRAGlobal(). |
|
|
|
Definition at line 87 of file GlobalValue.h. Referenced by DISerializeVisitor::Apply(), copyAttributesFrom(), llvm::DISerializer::getString(), GVExtractorPass::isolateGV(), and llvm::DISerializer::Serialize(). |
|
|
Definition at line 83 of file GlobalValue.h. Referenced by copyAttributesFrom(), LinkFunctionProtos(), and LinkGlobals(). |
|
|
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 can be safely deleted since the destructor will delete the dead constants as well. |
|
|
Definition at line 65 of file GlobalValue.h. |
|
|
Definition at line 63 of file GlobalValue.h. |
|
|
Definition at line 60 of file GlobalValue.h. |
|
|
Definition at line 66 of file GlobalValue.h. |
|
|
Definition at line 64 of file GlobalValue.h. |