|
reference, declaration → definition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
|
Derived Classes
include/llvm/IR/GlobalIndirectSymbol.h 28 class GlobalIndirectSymbol : public GlobalValue {
include/llvm/IR/GlobalObject.h 30 class GlobalObject : public GlobalValue {
Declarations
include/llvm/Analysis/ConstantFolding.h 31 class GlobalValue;
include/llvm/Analysis/TargetTransformInfo.h 45 class GlobalValue;
include/llvm/AsmParser/SlotMapping.h 23 class GlobalValue;
include/llvm/CodeGen/Analysis.h 27 class GlobalValue;
include/llvm/CodeGen/AsmPrinter.h 48 class GlobalValue;
include/llvm/CodeGen/BasicTTIImpl.h 59 class GlobalValue;
include/llvm/CodeGen/MachineFunction.h 56 class GlobalValue;
include/llvm/CodeGen/MachineOperand.h 29 class GlobalValue;
include/llvm/CodeGen/SelectionDAG.h 66 class GlobalValue;
include/llvm/CodeGen/SelectionDAGNodes.h 60 class GlobalValue;
include/llvm/CodeGen/TargetLowering.h 74 class GlobalValue;
include/llvm/CodeGen/TargetLoweringObjectFileImpl.h 24 class GlobalValue;
include/llvm/ExecutionEngine/ExecutionEngine.h 47 class GlobalValue;
include/llvm/ExecutionEngine/JITSymbol.h 32 class GlobalValue;
include/llvm/IR/GVMaterializer.h 25 class GlobalValue;
include/llvm/IR/Value.h 41 class GlobalValue;
include/llvm/LTO/legacy/LTOModule.h 30 class GlobalValue;
include/llvm/Linker/IRMover.h 18 class GlobalValue;
include/llvm/Object/IRObjectFile.h 25 class GlobalValue;
include/llvm/Object/ModuleSymbolTable.h 30 class GlobalValue;
include/llvm/Target/TargetLoweringObjectFile.h 26 class GlobalValue;
include/llvm/Target/TargetMachine.h 27 class GlobalValue;
include/llvm/Transforms/IPO.h 30 class GlobalValue;
include/llvm/Transforms/Utils/FunctionComparator.h 35 class GlobalValue;
include/llvm/Transforms/Utils/ModuleUtils.h 25 class GlobalValue;
lib/AsmParser/LLParser.h 36 class GlobalValue;
lib/CodeGen/AsmPrinter/WinException.h 20 class GlobalValue;
lib/Object/RecordStreamer.h 22 class GlobalValue;
lib/Target/AArch64/AArch64Subtarget.h 33 class GlobalValue;
lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h 33 class GlobalValue;
lib/Target/ARM/ARMConstantPoolValue.h 28 class GlobalValue;
lib/Target/ARM/ARMISelLowering.h 41 class GlobalValue;
lib/Target/ARM/ARMSubtarget.h 41 class GlobalValue;
lib/Target/PowerPC/PPCSubtarget.h 64 class GlobalValue;
lib/Target/SystemZ/SystemZConstantPoolValue.h 17 class GlobalValue;
lib/Target/SystemZ/SystemZSubtarget.h 30 class GlobalValue;
lib/Target/X86/X86Subtarget.h 37 class GlobalValue;
tools/clang/lib/CodeGen/CGBlocks.h 31 class GlobalValue;
tools/clang/lib/CodeGen/CodeGenModule.h 44 class GlobalValue;
tools/clang/lib/CodeGen/TargetInfo.h 27 class GlobalValue;
tools/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h 32 class GlobalValue;
tools/llvm-diff/DifferenceEngine.h 24 class GlobalValue;
References
examples/BrainF/BrainF.cpp 150 GlobalValue::InternalLinkage,
gen/lib/Target/AMDGPU/R600GenDAGISel.inc12399 isa<GlobalValue>(GetUnderlyingObject(
12413 !isa<GlobalValue>(GetUnderlyingObject(
include/llvm/ADT/ArrayRef.h 108 const ArrayRef<U *> &A,
110 std::is_convertible<U *const *, T const *>::value>::type * = nullptr)
118 const SmallVectorTemplateCommon<U *, DummyT> &Vec,
120 std::is_convertible<U *const *, T const *>::value>::type * = nullptr)
127 ArrayRef(const std::vector<U *, A> &Vec,
129 std::is_convertible<U *const *, T const *>::value>::type* = 0)
include/llvm/ADT/DenseMapInfo.h 39 static inline T* getEmptyKey() {
41 Val <<= PointerLikeTypeTraits<T*>::NumLowBitsAvailable;
45 static inline T* getTombstoneKey() {
47 Val <<= PointerLikeTypeTraits<T*>::NumLowBitsAvailable;
51 static unsigned getHashValue(const T *PtrVal) {
56 static bool isEqual(const T *LHS, const T *RHS) { return LHS == RHS; }
56 static bool isEqual(const T *LHS, const T *RHS) { return LHS == RHS; }
include/llvm/ADT/STLExtras.h 813 : public iterator_facade_base<concat_iterator<ValueT, IterTs...>,
859 template <size_t Index> ValueT *getHelper() const {
872 template <size_t... Ns> ValueT &get(std::index_sequence<Ns...>) const {
879 if (ValueT *P = (this->*GetHelperFn)())
901 ValueT &operator*() const {
920 concat_iterator<ValueT,
948 detail::concat_range<ValueT, RangeTs...> concat(RangeTs &&... Ranges) {
include/llvm/ADT/iterator.h 68 : public std::iterator<IteratorCategoryT, T, DifferenceTypeT, PointerT,
include/llvm/Analysis/ConstantFolding.h 38 bool IsConstantOffsetFromGlobal(Constant *C, GlobalValue *&GV, APInt &Offset,
include/llvm/Analysis/GlobalsModRef.h 40 SmallPtrSet<const GlobalValue *, 8> NonAddressTakenGlobals;
44 SmallPtrSet<const GlobalValue *, 8> IndirectGlobals;
48 DenseMap<const Value *, const GlobalValue *> AllocsForIndirectGlobals;
116 GlobalValue *OkayStoreDest = nullptr);
120 bool isNonEscapingGlobalNoAlias(const GlobalValue *GV, const Value *V);
122 const GlobalValue *GV, AAQueryInfo &AAQI);
include/llvm/Analysis/StackSafetyAnalysis.h 75 using StackSafetyGlobalInfo = std::map<const GlobalValue *, StackSafetyInfo>;
include/llvm/Analysis/TargetTransformInfo.h 549 bool isLegalAddressingMode(Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset,
620 int getScalingFactorCost(Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset,
1200 virtual bool isLegalAddressingMode(Type *Ty, GlobalValue *BaseGV,
1224 virtual int getScalingFactorCost(Type *Ty, GlobalValue *BaseGV,
1474 bool isLegalAddressingMode(Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset,
1533 int getScalingFactorCost(Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset,
include/llvm/Analysis/TargetTransformInfoImpl.h 219 bool isLegalAddressingMode(Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset,
278 int getScalingFactorCost(Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset,
738 auto *BaseGV = dyn_cast<GlobalValue>(Ptr->stripPointerCasts());
include/llvm/AsmParser/SlotMapping.h 33 std::vector<GlobalValue *> GlobalValues;
include/llvm/CodeGen/Analysis.h 97 GlobalValue *ExtractTypeInfo(Value *V);
include/llvm/CodeGen/AsmPrinter.h 238 const GlobalValue *GV) const;
240 MCSymbol *getSymbol(const GlobalValue *GV) const;
452 MCSymbol *getSymbolWithGlobalValueBase(const GlobalValue *GV,
534 void EmitTTypeReference(const GlobalValue *GV, unsigned Encoding) const;
644 void EmitLinkage(const GlobalValue *GV, MCSymbol *GVSym) const;
647 static Align getGVAlignment(const GlobalValue *GV, const DataLayout &DL,
include/llvm/CodeGen/BasicTTIImpl.h 237 bool isLegalAddressingMode(Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset,
264 int getScalingFactorCost(Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset,
include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h 405 MachineInstrBuilder buildGlobalValue(const DstOp &Res, const GlobalValue *GV);
include/llvm/CodeGen/MachineFunction.h 335 std::vector<const GlobalValue *> TypeInfos;
882 ArrayRef<const GlobalValue *> TyInfo);
886 ArrayRef<const GlobalValue *> TyInfo);
898 unsigned getTypeIDFor(const GlobalValue *TI);
961 const std::vector<const GlobalValue *> &getTypeInfos() const {
include/llvm/CodeGen/MachineInstrBuilder.h 168 const MachineInstrBuilder &addGlobalAddress(const GlobalValue *GV,
include/llvm/CodeGen/MachineOperand.h 191 const GlobalValue *GV; // For MO_GlobalAddress.
556 const GlobalValue *getGlobal() const {
732 void ChangeToGA(const GlobalValue *GV, int64_t Offset,
833 static MachineOperand CreateGA(const GlobalValue *GV, int64_t Offset,
include/llvm/CodeGen/PseudoSourceValue.h 127 const GlobalValue *GV;
130 GlobalValuePseudoSourceValue(const GlobalValue *GV,
137 const GlobalValue *getValue() const { return GV; }
161 ValueMap<const GlobalValue *,
189 const PseudoSourceValue *getGlobalValueCallEntry(const GlobalValue *GV);
include/llvm/CodeGen/SelectionDAG.h 639 SDValue getGlobalAddress(const GlobalValue *GV, const SDLoc &DL, EVT VT,
642 SDValue getTargetGlobalAddress(const GlobalValue *GV, const SDLoc &DL, EVT VT,
include/llvm/CodeGen/SelectionDAGNodes.h 1725 const GlobalValue *TheGlobal;
1730 const GlobalValue *GA, EVT VT, int64_t o,
1734 const GlobalValue *getGlobal() const { return TheGlobal; }
include/llvm/CodeGen/TargetLowering.h 2191 GlobalValue *BaseGV = nullptr;
3305 isGAPlusOffset(SDNode *N, const GlobalValue* &GA, int64_t &Offset) const;
include/llvm/CodeGen/TargetLoweringObjectFileImpl.h 73 const MCExpr *getTTypeGlobalReference(const GlobalValue *GV,
80 MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV,
90 const MCExpr *lowerRelativeReference(const GlobalValue *LHS,
91 const GlobalValue *RHS,
118 const MCExpr *getTTypeGlobalReference(const GlobalValue *GV,
125 MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV,
130 const MCExpr *getIndirectSymViaGOTPCRel(const GlobalValue *GV,
136 void getNameWithPrefix(SmallVectorImpl<char> &OutName, const GlobalValue *GV,
153 void getNameWithPrefix(SmallVectorImpl<char> &OutName, const GlobalValue *GV,
168 const GlobalValue *GV) const override;
171 const GlobalValue *GV) const override;
173 const MCExpr *lowerRelativeReference(const GlobalValue *LHS,
174 const GlobalValue *RHS,
206 const MCExpr *lowerRelativeReference(const GlobalValue *LHS,
207 const GlobalValue *RHS,
229 const MCExpr *lowerRelativeReference(const GlobalValue *LHS,
230 const GlobalValue *RHS,
include/llvm/ExecutionEngine/ExecutionEngine.h 159 std::string getMangledName(const GlobalValue *GV);
307 void addGlobalMapping(const GlobalValue *GV, void *Addr);
322 uint64_t updateGlobalMapping(const GlobalValue *GV, void *Addr);
333 void *getPointerToGlobalIfAvailable(const GlobalValue *GV);
340 void *getPointerToGlobal(const GlobalValue *GV);
385 const GlobalValue *getGlobalValueAtAddress(void *Addr);
include/llvm/ExecutionEngine/JITSymbol.h 144 static JITSymbolFlags fromGlobalValue(const GlobalValue &GV);
include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h 73 using GlobalValueSet = std::set<const GlobalValue *>;
660 ClonedF->setLinkage(GlobalValue::AvailableExternallyLinkage);
669 GlobalValue::ExternalLinkage, A->getName(),
672 return new GlobalVariable(*M, Ty, false, GlobalValue::ExternalLinkage,
674 GlobalValue::NotThreadLocal,
include/llvm/ExecutionEngine/Orc/IndirectionUtils.h 431 std::vector<GlobalValue *> operator()(Module &M);
include/llvm/ExecutionEngine/Orc/Layer.h 68 using SymbolNameToDefinitionMap = std::map<SymbolStringPtr, GlobalValue *>;
include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h 104 const GlobalValue* searchGVs(StringRef Name,
138 const GlobalValue* addGlobalValue(StringMap<const GlobalValue*> &Names,
138 const GlobalValue* addGlobalValue(StringMap<const GlobalValue*> &Names,
139 const GlobalValue &GV,
166 const GlobalValue* buildMangledSymbols(StringRef SearchName,
170 auto Symbols = std::make_unique<StringMap<const GlobalValue*>>();
186 mutable std::unique_ptr<StringMap<const GlobalValue*>> MangledSymbols;
include/llvm/ExecutionEngine/Orc/ThreadSafeModule.h 163 using GVPredicate = std::function<bool(const GlobalValue &)>;
164 using GVModifier = std::function<void(GlobalValue &)>;
include/llvm/IR/Function.h 291 const DenseSet<GlobalValue::GUID> *Imports = nullptr);
295 const DenseSet<GlobalValue::GUID> *Imports = nullptr);
314 DenseSet<GlobalValue::GUID> getImportGUIDs() const;
include/llvm/IR/GVMaterializer.h 37 virtual Error materialize(GlobalValue *GV) = 0;
include/llvm/IR/GlobalAlias.h 52 GlobalValue *Aliasee);
56 GlobalValue *Aliasee);
59 static GlobalAlias *create(const Twine &Name, GlobalValue *Aliasee);
include/llvm/IR/GlobalIndirectSymbol.h 28 class GlobalIndirectSymbol : public GlobalValue {
45 void copyAttributesFrom(const GlobalValue *Src) {
include/llvm/IR/GlobalObject.h 30 class GlobalObject : public GlobalValue {
include/llvm/IR/GlobalValue.h 192 GlobalValue(const GlobalValue &) = delete;
471 void copyAttributesFrom(const GlobalValue *Src);
492 GlobalValue::LinkageTypes Linkage,
include/llvm/IR/MDBuilder.h 74 const DenseSet<GlobalValue::GUID> *Imports);
include/llvm/IR/Mangler.h 30 mutable DenseMap<const GlobalValue*, unsigned> AnonGlobalIDs;
36 void getNameWithPrefix(raw_ostream &OS, const GlobalValue *GV,
38 void getNameWithPrefix(SmallVectorImpl<char> &OutName, const GlobalValue *GV,
49 void emitLinkerFlagsForGlobalCOFF(raw_ostream &OS, const GlobalValue *GV,
52 void emitLinkerFlagsForUsedCOFF(raw_ostream &OS, const GlobalValue *GV,
include/llvm/IR/Metadata.h 514 static const bool value = std::is_base_of<Constant, V>::value &&
576 inline typename std::enable_if<detail::IsValidPointer<X, Y>::value, X *>::type
576 inline typename std::enable_if<detail::IsValidPointer<X, Y>::value, X *>::type
579 return dyn_cast<X>(V->getValue());
589 inline typename std::enable_if<detail::IsValidPointer<X, Y>::value, X *>::type
589 inline typename std::enable_if<detail::IsValidPointer<X, Y>::value, X *>::type
592 return dyn_cast<X>(V->getValue());
include/llvm/IR/Module.h 309 GlobalValue *getNamedValue(StringRef Name) const;
512 llvm::Error materialize(GlobalValue *GV);
683 concat_iterator<GlobalValue, iterator, global_iterator, alias_iterator,
686 concat_iterator<const GlobalValue, const_iterator, const_global_iterator,
690 return concat<GlobalValue>(functions(), globals(), aliases(), ifuncs());
693 return concat<const GlobalValue>(functions(), globals(), aliases(),
905 SmallPtrSetImpl<GlobalValue *> &Set,
include/llvm/IR/ModuleSummaryIndex.h 135 const GlobalValue *GV;
160 std::map<GlobalValue::GUID, GlobalValueSummaryInfo>;
177 GlobalValue::GUID getGUID() const { return getRef()->first; }
178 const GlobalValue *getValue() const {
322 explicit GVFlags(GlobalValue::LinkageTypes Linkage,
338 GlobalValue::GUID OriginalName = 0;
367 GlobalValue::GUID getOriginalName() const { return OriginalName; }
370 void setOriginalName(GlobalValue::GUID Name) { OriginalName = Name; }
386 GlobalValue::LinkageTypes linkage() const {
392 void setLinkage(GlobalValue::LinkageTypes Linkage) {
470 GlobalValue::GUID getAliaseeGUID() const {
507 GlobalValue::GUID GUID;
525 std::vector<GlobalValue::GUID> TypeTests;
558 GlobalValue::LinkageTypes::AvailableExternallyLinkage,
595 std::vector<GlobalValue::GUID> TypeTests,
640 ArrayRef<GlobalValue::GUID> type_tests() const {
683 void addTypeTest(GlobalValue::GUID Guid) {
884 using GVSummaryMapTy = DenseMap<GlobalValue::GUID, GlobalValueSummary *>;
889 std::multimap<GlobalValue::GUID, std::pair<std::string, TypeIdSummary>>;
937 std::map<GlobalValue::GUID, GlobalValue::GUID> OidGuidMap;
937 std::map<GlobalValue::GUID, GlobalValue::GUID> OidGuidMap;
979 getOrInsertValuePtr(GlobalValue::GUID GUID) {
1087 bool isGUIDLive(GlobalValue::GUID GUID) const;
1096 ValueInfo getValueInfo(GlobalValue::GUID GUID) const {
1102 ValueInfo getOrInsertValueInfo(GlobalValue::GUID GUID) {
1112 ValueInfo getOrInsertValueInfo(GlobalValue::GUID GUID, StringRef Name) {
1120 ValueInfo getOrInsertValueInfo(const GlobalValue *GV) {
1128 GlobalValue::GUID getGUIDFromOriginalID(GlobalValue::GUID OriginalID) const {
1128 GlobalValue::GUID getGUIDFromOriginalID(GlobalValue::GUID OriginalID) const {
1140 void addGlobalValueSummary(const GlobalValue &GV,
1148 addGlobalValueSummary(getOrInsertValueInfo(GlobalValue::getGUID(ValueName)),
1163 void addOriginalName(GlobalValue::GUID ValueGUID,
1164 GlobalValue::GUID OrigGUID) {
1189 GlobalValueSummary *findSummaryInModule(GlobalValue::GUID ValueGUID,
1199 GlobalValueSummary *getGlobalValueSummary(const GlobalValue &GV,
1208 GlobalValueSummary *getGlobalValueSummary(GlobalValue::GUID ValueGUID,
1279 auto TidIter = TypeIdMap.equal_range(GlobalValue::getGUID(TypeId));
1284 {GlobalValue::getGUID(TypeId), {TypeId, TypeIdSummary()}});
1291 auto TidIter = TypeIdMap.equal_range(GlobalValue::getGUID(TypeId));
1358 void propagateAttributes(const DenseSet<GlobalValue::GUID> &PreservedSymbols);
1436 return !GlobalValue::isInterposableLinkage(S->linkage()) &&
include/llvm/IR/ModuleSummaryIndexYAML.h 265 V.insert({GlobalValue::getGUID(Key), {Key, TId}});
include/llvm/LTO/LTO.h 51 function_ref<bool(GlobalValue::GUID, const GlobalValueSummary *)>
53 function_ref<void(StringRef, GlobalValue::GUID, GlobalValue::LinkageTypes)>
53 function_ref<void(StringRef, GlobalValue::GUID, GlobalValue::LinkageTypes)>
55 const DenseSet<GlobalValue::GUID> &GUIDPreservedSymbols);
62 function_ref<bool(StringRef, GlobalValue::GUID)> isExported,
63 function_ref<bool(GlobalValue::GUID, const GlobalValueSummary *)>
74 const std::map<GlobalValue::GUID, GlobalValue::LinkageTypes> &ResolvedODR,
74 const std::map<GlobalValue::GUID, GlobalValue::LinkageTypes> &ResolvedODR,
76 const std::set<GlobalValue::GUID> &CfiFunctionDefs = {},
77 const std::set<GlobalValue::GUID> &CfiFunctionDecls = {});
329 std::vector<GlobalValue *> Keep;
340 DenseMap<GlobalValue::GUID, StringRef> PrevailingModuleForGUID;
421 const DenseSet<GlobalValue::GUID> &GUIDPreservedSymbols);
include/llvm/LTO/legacy/LTOCodeGenerator.h 205 llvm::function_ref<bool(const GlobalValue &)> mustPreserveGV);
225 StringMap<GlobalValue::LinkageTypes> ExternalSymbols;
include/llvm/LTO/legacy/LTOModule.h 44 const GlobalValue *symbol = 0;
151 const GlobalValue *getSymbolGV(uint32_t index) {
183 void addDefinedSymbol(StringRef Name, const GlobalValue *def,
188 void addDefinedDataSymbol(StringRef Name, const GlobalValue *v);
include/llvm/LinkAllPasses.h 232 llvm::Function::Create(nullptr, llvm::GlobalValue::ExternalLinkage)->viewCFGOnly();
include/llvm/Linker/IRMover.h 64 typedef std::function<void(GlobalValue &)> ValueAdder;
75 Error move(std::unique_ptr<Module> Src, ArrayRef<GlobalValue *> ValuesToLink,
76 std::function<void(GlobalValue &GV, ValueAdder Add)> AddLazyFor,
include/llvm/Object/IRSymtab.h 189 GlobalValue::VisibilityTypes getVisibility() const {
include/llvm/Object/ModuleSymbolTable.h 35 using Symbol = PointerUnion<GlobalValue *, AsmSymbol *>;
include/llvm/ProfileData/InstrProf.h 170 GlobalValue::LinkageTypes Linkage,
178 GlobalValue::LinkageTypes Linkage);
190 GlobalValue::LinkageTypes Linkage,
include/llvm/ProfileData/SampleProf.h 466 void findInlinedFunctions(DenseSet<GlobalValue::GUID> &S, const Module *M,
include/llvm/Support/Casting.h 34 using SimpleType = From; // The real type this represents...
37 static SimpleType &getSimplifiedValue(From &Val) { return Val; }
41 using NonConstSimpleType = typename simplify_type<From>::SimpleType;
47 static RetType getSimplifiedValue(const From& Val) {
57 static inline bool doit(const From &Val) {
58 return To::classof(&Val);
76 static inline bool doit(const From &Val) {
77 return isa_impl<To, From>::doit(Val);
77 return isa_impl<To, From>::doit(Val);
92 return isa_impl<To, From>::doit(*Val);
104 static inline bool doit(const From *Val) {
106 return isa_impl<To, From>::doit(*Val);
106 return isa_impl<To, From>::doit(*Val);
122 return isa_impl_wrap<To, SimpleFrom,
132 return isa_impl_cl<To,FromTy>::doit(Val);
141 template <class X, class Y> LLVM_NODISCARD inline bool isa(const Y &Val) {
142 return isa_impl_wrap<X, const Y,
142 return isa_impl_wrap<X, const Y,
143 typename simplify_type<const Y>::SimpleType>::doit(Val);
172 using ret_type = To *; // Pointer arg case, return Ty*
176 using ret_type = const To *; // Constant pointer arg case, return const Ty*
198 using ret_type = typename cast_retty<To, SimpleFrom>::ret_type;
204 using ret_type = typename cast_retty_impl<To,FromTy>::ret_type;
204 using ret_type = typename cast_retty_impl<To,FromTy>::ret_type;
210 To, From, typename simplify_type<From>::SimpleType>::ret_type;
210 To, From, typename simplify_type<From>::SimpleType>::ret_type;
210 To, From, typename simplify_type<From>::SimpleType>::ret_type;
227 static typename cast_retty<To, FromTy>::ret_type doit(const FromTy &Val) {
227 static typename cast_retty<To, FromTy>::ret_type doit(const FromTy &Val) {
227 static typename cast_retty<To, FromTy>::ret_type doit(const FromTy &Val) {
228 typename cast_retty<To, FromTy>::ret_type Res2
228 typename cast_retty<To, FromTy>::ret_type Res2
236 std::is_same<X, typename simplify_type<X>::SimpleType>::value;
236 std::is_same<X, typename simplify_type<X>::SimpleType>::value;
256 inline typename cast_retty<X, Y>::ret_type cast(Y &Val) {
256 inline typename cast_retty<X, Y>::ret_type cast(Y &Val) {
256 inline typename cast_retty<X, Y>::ret_type cast(Y &Val) {
258 return cast_convert_val<X, Y,
259 typename simplify_type<Y>::SimpleType>::doit(Val);
263 inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
263 inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
263 inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
265 return cast_convert_val<X, Y*,
265 return cast_convert_val<X, Y*,
266 typename simplify_type<Y*>::SimpleType>::doit(Val);
305 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type
305 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type
306 cast_or_null(Y *Val) {
309 return cast<X>(Val);
337 LLVM_NODISCARD inline typename cast_retty<X, Y>::ret_type dyn_cast(Y &Val) {
342 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type dyn_cast(Y *Val) {
342 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type dyn_cast(Y *Val) {
342 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type dyn_cast(Y *Val) {
343 return isa<X>(Val) ? cast<X>(Val) : nullptr;
343 return isa<X>(Val) ? cast<X>(Val) : nullptr;
360 typename cast_retty<X, Y>::ret_type>::type
366 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type
366 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type
367 dyn_cast_or_null(Y *Val) {
368 return (Val && isa<X>(Val)) ? cast<X>(Val) : nullptr;
368 return (Val && isa<X>(Val)) ? cast<X>(Val) : nullptr;
include/llvm/Support/PointerLikeTypeTraits.h 56 static inline void *getAsVoidPointer(T *P) { return P; }
57 static inline T *getFromVoidPointer(void *P) { return static_cast<T *>(P); }
59 enum { NumLowBitsAvailable = detail::ConstantLog2<alignof(T)>::value };
91 typedef PointerLikeTypeTraits<T *> NonConst;
93 static inline const void *getAsVoidPointer(const T *P) {
96 static inline const T *getFromVoidPointer(const void *P) {
include/llvm/Support/type_traits.h 55 struct add_const_past_pointer { using type = const T; };
include/llvm/Target/TargetLoweringObjectFile.h 113 const GlobalValue *GV,
131 virtual const MCExpr *getTTypeGlobalReference(const GlobalValue *GV,
139 MCSymbol *getSymbolWithGlobalValueBase(const GlobalValue *GV,
144 virtual MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV,
170 virtual const MCExpr *lowerRelativeReference(const GlobalValue *LHS,
171 const GlobalValue *RHS,
194 virtual const MCExpr *getIndirectSymViaGOTPCRel(const GlobalValue *GV,
204 const GlobalValue *GV) const {}
207 const GlobalValue *GV) const {}
include/llvm/Target/TargetMachine.h 213 bool shouldAssumeDSOLocal(const Module &M, const GlobalValue *GV) const;
219 TLSModel::Model getTLSModel(const GlobalValue *GV) const;
315 void getNameWithPrefix(SmallVectorImpl<char> &Name, const GlobalValue *GV,
317 MCSymbol *getSymbol(const GlobalValue *GV) const;
include/llvm/Transforms/IPO.h 89 ModulePass *createGVExtractionPass(std::vector<GlobalValue*>& GVs, bool
130 createInternalizePass(std::function<bool(const GlobalValue &)> MustPreserveGV);
include/llvm/Transforms/IPO/FunctionImport.h 37 using FunctionsToImportTy = std::unordered_set<GlobalValue::GUID>;
91 DenseMap<GlobalValue::GUID,
101 using ExportSetTy = std::unordered_set<GlobalValue::GUID>;
175 const DenseSet<GlobalValue::GUID> &GUIDPreservedSymbols,
176 function_ref<PrevailingType(GlobalValue::GUID)> isPrevailing);
182 const DenseSet<GlobalValue::GUID> &GUIDPreservedSymbols,
183 function_ref<PrevailingType(GlobalValue::GUID)> isPrevailing,
188 bool convertToDeclaration(GlobalValue &GV);
include/llvm/Transforms/IPO/GlobalDCE.h 34 SmallPtrSet<GlobalValue*, 32> AliveGlobals;
37 DenseMap<GlobalValue *, SmallPtrSet<GlobalValue *, 4>> GVDependencies;
37 DenseMap<GlobalValue *, SmallPtrSet<GlobalValue *, 4>> GVDependencies;
40 std::unordered_map<Constant *, SmallPtrSet<GlobalValue *, 8>>
44 std::unordered_multimap<Comdat *, GlobalValue *> ComdatMembers;
52 SmallPtrSet<GlobalValue *, 32> VFESafeVTables;
54 void UpdateGVDependencies(GlobalValue &GV);
55 void MarkLive(GlobalValue &GV,
56 SmallVectorImpl<GlobalValue *> *Updates = nullptr);
57 bool RemoveUnusedGlobalValue(GlobalValue &GV);
65 void ComputeDependencies(Value *V, SmallPtrSetImpl<GlobalValue *> &U);
include/llvm/Transforms/IPO/Internalize.h 38 const std::function<bool(const GlobalValue &)> MustPreserveGV;
43 bool shouldPreserveGV(const GlobalValue &GV);
46 bool maybeInternalize(GlobalValue &GV,
50 void checkComdatVisibility(GlobalValue &GV,
55 InternalizePass(std::function<bool(const GlobalValue &)> MustPreserveGV)
71 std::function<bool(const GlobalValue &)> MustPreserveGV,
include/llvm/Transforms/IPO/WholeProgramDevirt.h 247 ModuleSummaryIndex &Summary, std::set<GlobalValue::GUID> &ExportedGUIDs,
254 function_ref<bool(StringRef, GlobalValue::GUID)> isExported,
include/llvm/Transforms/Instrumentation/InstrProfiling.h 60 std::vector<GlobalValue *> UsedVars;
include/llvm/Transforms/Utils/Cloning.h 61 function_ref<bool(const GlobalValue *)> ShouldCloneDefinition);
include/llvm/Transforms/Utils/FunctionComparator.h 55 struct Config : ValueMapConfig<GlobalValue *> {
62 using ValueNumberMap = ValueMap<GlobalValue *, uint64_t, Config>;
71 uint64_t getNumber(GlobalValue* Global) {
80 void erase(GlobalValue *Global) {
226 int cmpGlobalValues(GlobalValue *L, GlobalValue *R) const;
226 int cmpGlobalValues(GlobalValue *L, GlobalValue *R) const;
include/llvm/Transforms/Utils/FunctionImportUtils.h 34 SetVector<GlobalValue *> *GlobalsToImport;
44 SmallPtrSet<GlobalValue *, 8> Used;
52 bool shouldPromoteLocalToGlobal(const GlobalValue *SGV);
58 bool isNonRenamableLocal(const GlobalValue &GV) const;
68 bool doImportAsDefinition(const GlobalValue *SGV);
74 std::string getName(const GlobalValue *SGV, bool DoPromote);
81 void processGlobalForThinLTO(GlobalValue &GV);
87 GlobalValue::LinkageTypes getLinkage(const GlobalValue *SGV, bool DoPromote);
87 GlobalValue::LinkageTypes getLinkage(const GlobalValue *SGV, bool DoPromote);
92 SetVector<GlobalValue *> *GlobalsToImport = nullptr)
111 static bool doImportAsDefinition(const GlobalValue *SGV,
112 SetVector<GlobalValue *> *GlobalsToImport);
119 SetVector<GlobalValue *> *GlobalsToImport = nullptr);
include/llvm/Transforms/Utils/ModuleUtils.h 78 void appendToUsed(Module &M, ArrayRef<GlobalValue *> Values);
81 void appendToCompilerUsed(Module &M, ArrayRef<GlobalValue *> Values);
lib/Analysis/AliasAnalysis.cpp 648 if (!isIdentifiedObject(Object) || isa<GlobalValue>(Object) ||
883 if (isa<GlobalValue>(V) && !isa<GlobalAlias>(V))
lib/Analysis/AliasAnalysisSummary.cpp 52 if (isa<GlobalValue>(Val))
lib/Analysis/CFLGraph.h 206 if (auto GVal = dyn_cast<GlobalValue>(Val)) {
lib/Analysis/CFLSteensAliasAnalysis.cpp 106 bool CanStoreMutableData = isa<GlobalValue>(Val) ||
lib/Analysis/ConstantFolding.cpp 288 bool llvm::IsConstantOffsetFromGlobal(Constant *C, GlobalValue *&GV,
291 if ((GV = dyn_cast<GlobalValue>(C))) {
551 GlobalValue *GVal;
744 GlobalValue *GV1, *GV2;
lib/Analysis/GlobalsModRef.cpp 62 typedef SmallDenseMap<const GlobalValue *, ModRefInfo, 16> GlobalInfoMapType;
159 ModRefInfo getModRefInfoForGlobal(const GlobalValue &GV) const {
183 void addModRefInfoForGlobal(const GlobalValue &GV, ModRefInfo NewMRI) {
195 void eraseModRefInfoForGlobal(const GlobalValue &GV) {
214 if (GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
214 if (GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
346 GlobalValue *OkayStoreDest) {
386 if (isa<GlobalValue>(C) || C->isConstantUsed())
627 static bool isNonEscapingGlobalNoAliasWithLoad(const GlobalValue *GV,
638 if (isa<GlobalValue>(Input) || isa<Argument>(Input) || isa<CallInst>(Input) ||
709 bool GlobalsAAResult::isNonEscapingGlobalNoAlias(const GlobalValue *GV,
725 if (auto *InputGV = dyn_cast<GlobalValue>(Input)) {
819 const GlobalValue *GV1 = dyn_cast<GlobalValue>(UV1);
819 const GlobalValue *GV1 = dyn_cast<GlobalValue>(UV1);
820 const GlobalValue *GV2 = dyn_cast<GlobalValue>(UV2);
820 const GlobalValue *GV2 = dyn_cast<GlobalValue>(UV2);
844 const GlobalValue *GV = GV1 ? GV1 : GV2;
891 const GlobalValue *GV,
928 if (const GlobalValue *GV =
929 dyn_cast<GlobalValue>(GetUnderlyingObject(Loc.Ptr, DL)))
lib/Analysis/InstructionSimplify.cpp 2450 if (const GlobalValue *GV = dyn_cast<GlobalValue>(V))
2450 if (const GlobalValue *GV = dyn_cast<GlobalValue>(V))
4875 GlobalValue *PtrSym;
4919 GlobalValue *LoadedRHSSym;
lib/Analysis/MemoryDependenceAnalysis.cpp 370 if (isa<GlobalValue>(LoadOperand))
lib/Analysis/ModuleSummaryAnalysis.cpp 111 if (auto *GV = dyn_cast<GlobalValue>(Operand)) {
136 static bool isNonRenamableLocal(const GlobalValue &GV) {
142 static void addVCallToSet(DevirtCallSite Call, GlobalValue::GUID Guid,
161 const CallInst *CI, SetVector<GlobalValue::GUID> &TypeTests,
173 GlobalValue::GUID Guid = GlobalValue::getGUID(TypeId->getString());
173 GlobalValue::GUID Guid = GlobalValue::getGUID(TypeId->getString());
204 GlobalValue::GUID Guid = GlobalValue::getGUID(TypeId->getString());
204 GlobalValue::GUID Guid = GlobalValue::getGUID(TypeId->getString());
245 DenseSet<GlobalValue::GUID> &CantBePromoted,
256 SetVector<GlobalValue::GUID> TypeTests;
296 if (auto *GV = dyn_cast<GlobalValue>(Stored))
296 if (auto *GV = dyn_cast<GlobalValue>(Stored))
354 cast<GlobalValue>(CalledValue))];
570 DenseSet<GlobalValue::GUID> &CantBePromoted,
614 DenseSet<GlobalValue::GUID> &CantBePromoted) {
633 if (ValueInfo VI = Index.getValueInfo(GlobalValue::getGUID(Name)))
654 SmallPtrSet<GlobalValue *, 8> LocalsUsed;
655 SmallPtrSet<GlobalValue *, 8> Used;
660 DenseSet<GlobalValue::GUID> CantBePromoted;
661 for (auto *V : Used) {
686 GlobalValue *GV = M.getNamedValue(Name);
690 GlobalValueSummary::GVFlags GVFlags(GlobalValue::InternalLinkage,
767 for (auto *V : LocalsUsed) {
lib/Analysis/ScalarEvolution.cpp 599 if (const auto *LGV = dyn_cast<GlobalValue>(LV)) {
599 if (const auto *LGV = dyn_cast<GlobalValue>(LV)) {
600 const auto *RGV = cast<GlobalValue>(RV);
600 const auto *RGV = cast<GlobalValue>(RV);
604 return !(GlobalValue::isPrivateLinkage(LT) ||
605 GlobalValue::isInternalLinkage(LT));
lib/Analysis/StackSafetyAnalysis.cpp 59 const GlobalValue *Callee = nullptr;
67 PassAsArgInfo(const GlobalValue *Callee, size_t ParamNo, ConstantRange Offset)
147 const GlobalValue *GV = nullptr;
336 const GlobalValue *Callee =
337 dyn_cast<GlobalValue>(CS.getCalledValue()->stripPointerCasts());
395 std::map<const GlobalValue *, StackSafetyInfo::FunctionInfo>;
399 DenseMap<const GlobalValue *, SmallVector<const GlobalValue *, 4>> Callers;
399 DenseMap<const GlobalValue *, SmallVector<const GlobalValue *, 4>> Callers;
400 SetVector<const GlobalValue *> WorkList;
405 ConstantRange getArgumentAccessRange(const GlobalValue *Callee,
408 void updateOneNode(const GlobalValue *Callee,
410 void updateOneNode(const GlobalValue *Callee) {
443 StackSafetyDataFlowAnalysis::getArgumentAccessRange(const GlobalValue *Callee,
480 const GlobalValue *Callee, StackSafetyInfo::FunctionInfo &FS) {
504 SmallVector<const GlobalValue *, 16> Callees;
525 const GlobalValue *Callee = WorkList.back();
lib/Analysis/TargetLibraryInfo.cpp 615 return GlobalValue::dropLLVMManglingEscape(funcName);
lib/Analysis/TargetTransformInfo.cpp 258 bool TargetTransformInfo::isLegalAddressingMode(Type *Ty, GlobalValue *BaseGV,
339 int TargetTransformInfo::getScalingFactorCost(Type *Ty, GlobalValue *BaseGV,
578 if (Splat && (isa<Argument>(Splat) || isa<GlobalValue>(Splat)))
lib/Analysis/ValueTracking.cpp 2033 if (const GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
2033 if (const GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
lib/AsmParser/LLParser.cpp 533 UnnamedAddr = GlobalValue::UnnamedAddr::Global;
535 UnnamedAddr = GlobalValue::UnnamedAddr::Local;
537 UnnamedAddr = GlobalValue::UnnamedAddr::None;
847 return !GlobalValue::isLocalLinkage((GlobalValue::LinkageTypes)L) ||
848 (GlobalValue::VisibilityTypes)V == GlobalValue::DefaultVisibility;
853 static void maybeSetDSOLocal(bool DSOLocal, GlobalValue &GV) {
886 GlobalValue::LinkageTypes Linkage = (GlobalValue::LinkageTypes) L;
935 GlobalValue *GVal = nullptr;
1053 !GlobalValue::isValidDeclarationLinkage(
1062 GlobalValue *GVal = nullptr;
1081 GV = new GlobalVariable(*M, Ty, false, GlobalValue::ExternalLinkage, nullptr,
1364 static inline GlobalValue *createGlobalFwdRef(Module *M, PointerType *PTy,
1367 return Function::Create(FT, GlobalValue::ExternalWeakLinkage,
1371 GlobalValue::ExternalWeakLinkage, nullptr, Name,
1401 GlobalValue *LLParser::GetGlobalVal(const std::string &Name, Type *Ty,
1410 GlobalValue *Val =
1411 cast_or_null<GlobalValue>(M->getValueSymbolTable().lookup(Name));
1423 return cast_or_null<GlobalValue>(
1427 GlobalValue *FwdVal = createGlobalFwdRef(M, PTy, Name);
1432 GlobalValue *LLParser::GetGlobalVal(unsigned ID, Type *Ty, LocTy Loc,
1440 GlobalValue *Val = ID < NumberedVals.size() ? NumberedVals[ID] : nullptr;
1452 return cast_or_null<GlobalValue>(
1456 GlobalValue *FwdVal = createGlobalFwdRef(M, PTy, "");
1801 return GlobalValue::ExternalLinkage;
1803 return GlobalValue::PrivateLinkage;
1805 return GlobalValue::InternalLinkage;
1807 return GlobalValue::WeakAnyLinkage;
1809 return GlobalValue::WeakODRLinkage;
1811 return GlobalValue::LinkOnceAnyLinkage;
1813 return GlobalValue::LinkOnceODRLinkage;
1815 return GlobalValue::AvailableExternallyLinkage;
1817 return GlobalValue::AppendingLinkage;
1819 return GlobalValue::CommonLinkage;
1821 return GlobalValue::ExternalWeakLinkage;
1823 return GlobalValue::ExternalLinkage;
1851 if (DSOLocal && DLLStorageClass == GlobalValue::DLLImportStorageClass) {
1883 Res = GlobalValue::DefaultVisibility;
1886 Res = GlobalValue::DefaultVisibility;
1889 Res = GlobalValue::HiddenVisibility;
1892 Res = GlobalValue::ProtectedVisibility;
1906 Res = GlobalValue::DefaultStorageClass;
1909 Res = GlobalValue::DLLImportStorageClass;
1912 Res = GlobalValue::DLLExportStorageClass;
3248 GlobalValue *GV = nullptr;
3267 GlobalValue *&FwdRef =
3275 GlobalValue::InternalLinkage, nullptr, "");
5324 case GlobalValue::ExternalLinkage:
5326 case GlobalValue::ExternalWeakLinkage:
5330 case GlobalValue::PrivateLinkage:
5331 case GlobalValue::InternalLinkage:
5332 case GlobalValue::AvailableExternallyLinkage:
5333 case GlobalValue::LinkOnceAnyLinkage:
5334 case GlobalValue::LinkOnceODRLinkage:
5335 case GlobalValue::WeakAnyLinkage:
5336 case GlobalValue::WeakODRLinkage:
5340 case GlobalValue::AppendingLinkage:
5341 case GlobalValue::CommonLinkage:
5381 GlobalValue::UnnamedAddr UnnamedAddr = GlobalValue::UnnamedAddr::None;
5381 GlobalValue::UnnamedAddr UnnamedAddr = GlobalValue::UnnamedAddr::None;
5479 Fn = Function::Create(FT, GlobalValue::ExternalLinkage, AddrSpace,
5555 GlobalValue *GV = I.second;
7422 GlobalValue *GV;
7514 *TIDRef.first = GlobalValue::getGUID(Name);
7621 *TIDRef.first = GlobalValue::getGUID(Name);
7915 std::string Name, GlobalValue::GUID GUID, GlobalValue::LinkageTypes Linkage,
7915 std::string Name, GlobalValue::GUID GUID, GlobalValue::LinkageTypes Linkage,
7925 auto *GV = M->getNamedValue(Name);
7932 GUID = GlobalValue::getGUID(
7933 GlobalValue::getGlobalIdentifier(Name, Linkage, SourceFileName));
7989 GlobalValue::GUID GUID = 0;
8017 AddGlobalValueToIndex(Name, GUID, GlobalValue::ExternalLinkage, ID,
8060 bool LLParser::ParseFunctionSummary(std::string Name, GlobalValue::GUID GUID,
8067 /*Linkage=*/GlobalValue::ExternalLinkage, /*NotEligibleToImport=*/false,
8130 bool LLParser::ParseVariableSummary(std::string Name, GlobalValue::GUID GUID,
8137 /*Linkage=*/GlobalValue::ExternalLinkage, /*NotEligibleToImport=*/false,
8185 bool LLParser::ParseAliasSummary(std::string Name, GlobalValue::GUID GUID,
8193 /*Linkage=*/GlobalValue::ExternalLinkage, /*NotEligibleToImport=*/false,
8569 bool LLParser::ParseTypeTests(std::vector<GlobalValue::GUID> &TypeTests) {
8579 GlobalValue::GUID GUID = 0;
lib/AsmParser/LLParser.h 125 std::map<std::string, std::pair<GlobalValue*, LocTy> > ForwardRefVals;
126 std::map<unsigned, std::pair<GlobalValue*, LocTy> > ForwardRefValIDs;
127 std::vector<GlobalValue*> NumberedVals;
134 std::map<ValID, std::map<ValID, GlobalValue *>> ForwardRefBlockAddresses;
153 std::map<unsigned, std::vector<std::pair<GlobalValue::GUID *, LocTy>>>
204 GlobalValue *GetGlobalVal(const std::string &N, Type *Ty, LocTy Loc,
206 GlobalValue *GetGlobalVal(unsigned ID, Type *Ty, LocTy Loc, bool IsCall);
351 bool ParseFunctionSummary(std::string Name, GlobalValue::GUID, unsigned ID);
352 bool ParseVariableSummary(std::string Name, GlobalValue::GUID, unsigned ID);
353 bool ParseAliasSummary(std::string Name, GlobalValue::GUID, unsigned ID);
360 bool ParseTypeTests(std::vector<GlobalValue::GUID> &TypeTests);
385 void AddGlobalValueToIndex(std::string Name, GlobalValue::GUID,
386 GlobalValue::LinkageTypes Linkage, unsigned ID,
lib/Bitcode/Reader/BitcodeReader.cpp 575 Error materialize(GlobalValue *GV) override;
790 DenseMap<unsigned, std::pair<ValueInfo, GlobalValue::GUID>>
819 GlobalValue::LinkageTypes Linkage,
823 DenseMap<unsigned, GlobalValue::LinkageTypes> &ValueIdToLinkageMap);
835 std::pair<ValueInfo, GlobalValue::GUID>
914 static GlobalValue::LinkageTypes getDecodedLinkage(unsigned Val) {
918 return GlobalValue::ExternalLinkage;
920 return GlobalValue::AppendingLinkage;
922 return GlobalValue::InternalLinkage;
924 return GlobalValue::ExternalLinkage; // Obsolete DLLImportLinkage
926 return GlobalValue::ExternalLinkage; // Obsolete DLLExportLinkage
928 return GlobalValue::ExternalWeakLinkage;
930 return GlobalValue::CommonLinkage;
932 return GlobalValue::PrivateLinkage;
934 return GlobalValue::AvailableExternallyLinkage;
936 return GlobalValue::PrivateLinkage; // Obsolete LinkerPrivateLinkage
938 return GlobalValue::PrivateLinkage; // Obsolete LinkerPrivateWeakLinkage
940 return GlobalValue::ExternalLinkage; // Obsolete LinkOnceODRAutoHideLinkage
943 return GlobalValue::WeakAnyLinkage;
946 return GlobalValue::WeakODRLinkage;
949 return GlobalValue::LinkOnceAnyLinkage;
952 return GlobalValue::LinkOnceODRLinkage;
991 static GlobalValue::VisibilityTypes getDecodedVisibility(unsigned Val) {
994 case 0: return GlobalValue::DefaultVisibility;
995 case 1: return GlobalValue::HiddenVisibility;
996 case 2: return GlobalValue::ProtectedVisibility;
1000 static GlobalValue::DLLStorageClassTypes
1004 case 0: return GlobalValue::DefaultStorageClass;
1005 case 1: return GlobalValue::DLLImportStorageClass;
1006 case 2: return GlobalValue::DLLExportStorageClass;
1178 static void upgradeDLLImportExportLinkage(GlobalValue *GV, unsigned Val) {
1180 case 5: GV->setDLLStorageClass(GlobalValue::DLLImportStorageClass); break;
1181 case 6: GV->setDLLStorageClass(GlobalValue::DLLExportStorageClass); break;
3079 static void inferDSOLocal(GlobalValue *GV) {
3114 GlobalValue::LinkageTypes Linkage = getDecodedLinkage(RawLinkage);
3124 GlobalValue::VisibilityTypes Visibility = GlobalValue::DefaultVisibility;
3124 GlobalValue::VisibilityTypes Visibility = GlobalValue::DefaultVisibility;
3126 if (Record.size() > 6 && !GlobalValue::isLocalLinkage(Linkage))
3134 GlobalValue::UnnamedAddr UnnamedAddr = GlobalValue::UnnamedAddr::None;
3134 GlobalValue::UnnamedAddr UnnamedAddr = GlobalValue::UnnamedAddr::None;
3220 Function::Create(cast<FunctionType>(FTy), GlobalValue::ExternalLinkage,
3264 GlobalValue::UnnamedAddr UnnamedAddr = GlobalValue::UnnamedAddr::None;
3264 GlobalValue::UnnamedAddr UnnamedAddr = GlobalValue::UnnamedAddr::None;
5221 Error BitcodeReader::materialize(GlobalValue *GV) {
5363 std::pair<ValueInfo, GlobalValue::GUID>
5371 uint64_t ValueID, StringRef ValueName, GlobalValue::LinkageTypes Linkage,
5374 GlobalValue::getGlobalIdentifier(ValueName, Linkage, SourceFileName);
5375 auto ValueGUID = GlobalValue::getGUID(GlobalId);
5377 if (GlobalValue::isLocalLinkage(Linkage))
5378 OriginalNameID = GlobalValue::getGUID(ValueName);
5398 DenseMap<unsigned, GlobalValue::LinkageTypes> &ValueIdToLinkageMap) {
5475 GlobalValue::GUID RefGUID = Record[1];
5494 DenseMap<unsigned, GlobalValue::LinkageTypes> ValueIdToLinkageMap;
5612 GlobalValue::LinkageTypes Linkage = getDecodedLinkage(RawLinkage);
5775 GlobalValue::GUID LastSeenGUID = 0;
5780 std::vector<GlobalValue::GUID> PendingTypeTests;
5847 GlobalValue::GUID RefGUID = Record[1];
lib/Bitcode/Reader/ValueList.cpp 174 if (!isa<Constant>(U) || isa<GlobalValue>(U)) {
lib/Bitcode/Writer/BitcodeWriter.cpp 166 std::map<GlobalValue::GUID, unsigned> GUIDToValueIdMap;
220 void assignValueId(GlobalValue::GUID ValGUID) {
224 unsigned getValueId(GlobalValue::GUID ValGUID) {
240 std::map<GlobalValue::GUID, unsigned> &valueIds() { return GUIDToValueIdMap; }
410 std::map<GlobalValue::GUID, unsigned> GUIDToValueIdMap;
435 using GVInfo = std::pair<GlobalValue::GUID, GlobalValueSummary *>;
489 Optional<unsigned> getValueId(GlobalValue::GUID ValGUID) {
496 std::map<GlobalValue::GUID, unsigned> &valueIds() { return GUIDToValueIdMap; }
969 static unsigned getEncodedLinkage(const GlobalValue::LinkageTypes Linkage) {
971 case GlobalValue::ExternalLinkage:
973 case GlobalValue::WeakAnyLinkage:
975 case GlobalValue::AppendingLinkage:
977 case GlobalValue::InternalLinkage:
979 case GlobalValue::LinkOnceAnyLinkage:
981 case GlobalValue::ExternalWeakLinkage:
983 case GlobalValue::CommonLinkage:
985 case GlobalValue::PrivateLinkage:
987 case GlobalValue::WeakODRLinkage:
989 case GlobalValue::LinkOnceODRLinkage:
991 case GlobalValue::AvailableExternallyLinkage:
997 static unsigned getEncodedLinkage(const GlobalValue &GV) {
1033 static unsigned getEncodedVisibility(const GlobalValue &GV) {
1035 case GlobalValue::DefaultVisibility: return 0;
1036 case GlobalValue::HiddenVisibility: return 1;
1037 case GlobalValue::ProtectedVisibility: return 2;
1042 static unsigned getEncodedDLLStorageClass(const GlobalValue &GV) {
1044 case GlobalValue::DefaultStorageClass: return 0;
1045 case GlobalValue::DLLImportStorageClass: return 1;
1046 case GlobalValue::DLLExportStorageClass: return 2;
1051 static unsigned getEncodedThreadLocalMode(const GlobalValue &GV) {
1078 static unsigned getEncodedUnnamedAddr(const GlobalValue &GV) {
1080 case GlobalValue::UnnamedAddr::None: return 0;
1081 case GlobalValue::UnnamedAddr::Local: return 2;
1082 case GlobalValue::UnnamedAddr::Global: return 1;
1169 for (const GlobalValue &GV : M.globals()) {
1278 GV.getVisibility() != GlobalValue::DefaultVisibility ||
1279 GV.getUnnamedAddr() != GlobalValue::UnnamedAddr::None ||
1281 GV.getDLLStorageClass() != GlobalValue::DefaultStorageClass ||
2540 if (!isa<GlobalValue>(Vals[i].first)) {
3554 std::set<GlobalValue::GUID> &ReferencedTypeIds) {
3973 std::set<GlobalValue::GUID> ReferencedTypeIds;
3978 if (!GlobalValue::isLocalLinkage(S.linkage()))
3985 std::set<GlobalValue::GUID> DefOrUseGUIDs;
4073 GlobalValue::GUID GUID = EI.first.getGUID();
4137 GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(S)))) {
4137 GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(S)))) {
4151 GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(S)))) {
4151 GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(S)))) {
lib/Bitcode/Writer/ValueEnumerator.cpp 92 if (C->getNumOperands() && !isa<GlobalValue>(C))
94 if (!isa<BasicBlock>(Op) && !isa<GlobalValue>(Op))
114 if (!isa<GlobalValue>(G.getInitializer()))
117 if (!isa<GlobalValue>(A.getAliasee()))
120 if (!isa<GlobalValue>(I.getResolver()))
124 if (!isa<GlobalValue>(U.get()))
160 if ((isa<Constant>(*Op) && !isa<GlobalValue>(*Op)) ||
824 if (isa<GlobalValue>(C)) {
963 if ((isa<Constant>(OI) && !isa<GlobalValue>(OI)) || isa<InlineAsm>(OI))
lib/CodeGen/Analysis.cpp 158 GlobalValue *llvm::ExtractTypeInfo(Value *V) {
160 GlobalValue *GV = dyn_cast<GlobalValue>(V);
160 GlobalValue *GV = dyn_cast<GlobalValue>(V);
167 GV = dyn_cast<GlobalValue>(Init);
lib/CodeGen/AsmPrinter/ARMException.cpp 96 const std::vector<const GlobalValue *> &TypeInfos = MF->getTypeInfos();
109 for (const GlobalValue *GV : reverse(TypeInfos)) {
lib/CodeGen/AsmPrinter/AsmPrinter.cpp 161 Align AsmPrinter::getGVAlignment(const GlobalValue *GV, const DataLayout &DL,
388 static bool canBeHidden(const GlobalValue *GV, const MCAsmInfo &MAI) {
395 void AsmPrinter::EmitLinkage(const GlobalValue *GV, MCSymbol *GVSym) const {
396 GlobalValue::LinkageTypes Linkage = GV->getLinkage();
398 case GlobalValue::CommonLinkage:
399 case GlobalValue::LinkOnceAnyLinkage:
400 case GlobalValue::LinkOnceODRLinkage:
401 case GlobalValue::WeakAnyLinkage:
402 case GlobalValue::WeakODRLinkage:
421 case GlobalValue::ExternalLinkage:
425 case GlobalValue::PrivateLinkage:
427 case GlobalValue::InternalLinkage:
431 case GlobalValue::AppendingLinkage:
432 case GlobalValue::AvailableExternallyLinkage:
433 case GlobalValue::ExternalWeakLinkage:
440 const GlobalValue *GV) const {
444 MCSymbol *AsmPrinter::getSymbol(const GlobalValue *GV) const {
656 << GlobalValue::dropLLVMManglingEscape(F.getName()) << '\n';
666 F.getLinkage() != GlobalValue::InternalLinkage)
1249 !isa<GlobalValue>(GV->getOperand(0)))
1406 GlobalValue::VisibilityTypes V = F.getVisibility();
1407 if (V == GlobalValue::DefaultVisibility)
1566 for (const GlobalValue &GV : M.global_values()) {
1585 const auto *GV = cast<GlobalValue>(Op->stripPointerCasts());
1585 const auto *GV = cast<GlobalValue>(Op->stripPointerCasts());
1609 for (const GlobalValue &GV : M.global_values())
1619 for (const GlobalValue &GV : M.global_values()) {
1621 GV.getVisibility() != GlobalValue::DefaultVisibility)
1965 const GlobalValue *GV =
1966 dyn_cast<GlobalValue>(InitList->getOperand(i)->stripPointerCasts());
1977 GlobalValue *ComdatKey = nullptr;
2017 dyn_cast<GlobalValue>(CS->getOperand(2)->stripPointerCasts());
2028 if (GlobalValue *GV = S.ComdatKey) {
2174 if (const GlobalValue *GV = dyn_cast<GlobalValue>(CV))
2174 if (const GlobalValue *GV = dyn_cast<GlobalValue>(CV))
2264 GlobalValue *LHSGV;
2268 GlobalValue *RHSGV;
2615 const GlobalValue *BaseGV = dyn_cast_or_null<GlobalValue>(BaseCst);
2615 const GlobalValue *BaseGV = dyn_cast_or_null<GlobalValue>(BaseCst);
2657 const GlobalValue *FinalGV = dyn_cast<GlobalValue>(GV->getOperand(0));
2657 const GlobalValue *FinalGV = dyn_cast<GlobalValue>(GV->getOperand(0));
2829 MCSymbol *AsmPrinter::getSymbolWithGlobalValueBase(const GlobalValue *GV,
2995 case GlobalValue::HiddenVisibility:
3001 case GlobalValue::ProtectedVisibility:
lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp 139 void AsmPrinter::EmitTTypeReference(const GlobalValue *GV,
lib/CodeGen/AsmPrinter/CodeViewDebug.cpp 946 std::string FuncName = GlobalValue::dropLLVMManglingEscape(GV->getName());
1009 FuncName = GlobalValue::dropLLVMManglingEscape(GV->getName());
3047 Twine(GlobalValue::dropLLVMManglingEscape(GV->getName())));
lib/CodeGen/AsmPrinter/DwarfUnit.cpp 598 GlobalValue::dropLLVMManglingEscape(LinkageName));
1055 else if (GlobalValue *GV = mdconst::dyn_extract<GlobalValue>(Val)) {
1055 else if (GlobalValue *GV = mdconst::dyn_extract<GlobalValue>(Val)) {
lib/CodeGen/AsmPrinter/EHStreamer.cpp 351 const std::vector<const GlobalValue *> &TypeInfos = MF->getTypeInfos();
615 const std::vector<const GlobalValue *> &TypeInfos = MF->getTypeInfos();
628 for (const GlobalValue *GV : make_range(TypeInfos.rbegin(),
lib/CodeGen/AsmPrinter/WinException.cpp 101 GlobalValue::dropLLVMManglingEscape(MF->getFunction().getName());
180 StringRef FuncLinkageName = GlobalValue::dropLLVMManglingEscape(F.getName());
276 StringRef FuncLinkageName = GlobalValue::dropLLVMManglingEscape(F.getName());
307 const MCExpr *WinException::create32bitRef(const GlobalValue *GV) {
564 GlobalValue::dropLLVMManglingEscape(MF->getFunction().getName());
663 StringRef FuncLinkageName = GlobalValue::dropLLVMManglingEscape(F.getName());
969 StringRef FLinkageName = GlobalValue::dropLLVMManglingEscape(F.getName());
lib/CodeGen/AsmPrinter/WinException.h 76 const MCExpr *create32bitRef(const GlobalValue *GV);
lib/CodeGen/CodeGenPrepare.cpp 4183 if (isa<Argument>(Base) || isa<GlobalValue>(Base) ||
4317 } else if (GlobalValue *GV = dyn_cast<GlobalValue>(Addr)) {
4317 } else if (GlobalValue *GV = dyn_cast<GlobalValue>(Addr)) {
lib/CodeGen/GlobalISel/IRTranslator.cpp 1434 GlobalValue *GV = ExtractTypeInfo(CI.getArgOperand(0));
2124 } else if (auto GV = dyn_cast<GlobalValue>(&C))
lib/CodeGen/GlobalISel/MachineIRBuilder.cpp 192 const GlobalValue *GV) {
lib/CodeGen/GlobalMerge.cpp 497 GlobalValue::LinkageTypes Linkage = HasExternal
498 ? GlobalValue::ExternalLinkage
499 : GlobalValue::InternalLinkage;
514 auto MergedLinkage = IsMachO ? Linkage : GlobalValue::PrivateLinkage;
524 GlobalValue::LinkageTypes Linkage = Globals[k]->getLinkage();
526 GlobalValue::DLLStorageClassTypes DLLStorage =
548 if (Linkage != GlobalValue::InternalLinkage || !IsMachO) {
lib/CodeGen/MIRParser/MIParser.cpp 435 bool parseGlobalValue(GlobalValue *&GV);
1731 bool MIParser::parseGlobalValue(GlobalValue *&GV) {
1758 GlobalValue *GV = nullptr;
2181 GlobalValue *GV = nullptr;
2610 GlobalValue *GV = nullptr;
2736 GlobalValue *GV = nullptr;
lib/CodeGen/MachineFunction.cpp 673 dyn_cast<GlobalValue>(Val->stripPointerCasts()));
677 SmallVector<const GlobalValue *, 4> FilterList;
680 FilterList.push_back(cast<GlobalValue>((*II)->stripPointerCasts()));
689 addCatchTypeInfo(LandingPad, dyn_cast<GlobalValue>(TypeInfo));
700 ArrayRef<const GlobalValue *> TyInfo) {
707 ArrayRef<const GlobalValue *> TyInfo) {
790 unsigned MachineFunction::getTypeIDFor(const GlobalValue *TI) {
lib/CodeGen/MachineOperand.cpp 184 void MachineOperand::ChangeToGA(const GlobalValue *GV, int64_t Offset,
463 if (isa<GlobalValue>(V)) {
lib/CodeGen/MachineOutliner.cpp 1105 F->setLinkage(GlobalValue::InternalLinkage);
1106 F->setUnnamedAddr(GlobalValue::UnnamedAddr::Global);
lib/CodeGen/PseudoSourceValue.cpp 99 const GlobalValue *GV,
137 PseudoSourceValueManager::getGlobalValueCallEntry(const GlobalValue *GV) {
lib/CodeGen/SelectionDAG/FastISel.cpp 971 } else if (const auto *GV = dyn_cast<GlobalValue>(Callee)) {
971 } else if (const auto *GV = dyn_cast<GlobalValue>(Callee)) {
lib/CodeGen/SelectionDAG/SelectionDAG.cpp 1356 SDValue SelectionDAG::getGlobalAddress(const GlobalValue *GV, const SDLoc &DL,
8822 const GlobalValue *GA, EVT VT,
9259 const GlobalValue *GV;
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp 1449 if (const GlobalValue *GV = dyn_cast<GlobalValue>(C))
1449 if (const GlobalValue *GV = dyn_cast<GlobalValue>(C))
5921 GlobalValue *GV = ExtractTypeInfo(I.getArgOperand(0));
6655 GlobalValue::dropLLVMManglingEscape(MF.getName()), Idx);
6677 GlobalValue::dropLLVMManglingEscape(Fn->getName()), IdxVal);
lib/CodeGen/SelectionDAG/TargetLowering.cpp 446 const GlobalValue *GV = GA->getGlobal();
3934 bool TargetLowering::isGAPlusOffset(SDNode *WN, const GlobalValue *&GA,
4424 if (isa<GlobalValue>(CallOperandVal))
lib/CodeGen/ShadowStackGCLowering.cpp 211 M, StackEntryPtrTy, false, GlobalValue::LinkOnceAnyLinkage,
215 Head->setLinkage(GlobalValue::LinkOnceAnyLinkage);
lib/CodeGen/TargetLoweringBase.cpp 1690 GlobalValue::InitialExecTLSModel :
1691 GlobalValue::NotThreadLocal;
1696 *M, StackPtrTy, false, GlobalValue::ExternalLinkage, nullptr,
lib/CodeGen/TargetLoweringObjectFileImpl.cpp 356 const GlobalValue *GV, const TargetMachine &TM,
390 const GlobalValue *GV, unsigned Encoding, const TargetMachine &TM,
503 static const Comdat *getELFComdat(const GlobalValue *GV) {
529 auto *OtherGV = dyn_cast<GlobalValue>(VM->getValue());
529 auto *OtherGV = dyn_cast<GlobalValue>(VM->getValue());
805 const GlobalValue *LHS, const GlobalValue *RHS,
805 const GlobalValue *LHS, const GlobalValue *RHS,
928 static void checkMachOComdat(const GlobalValue *GV) {
1066 const GlobalValue *GV, unsigned Encoding, const TargetMachine &TM,
1094 const GlobalValue *GV, const TargetMachine &TM,
1114 const GlobalValue *GV, const MCSymbol *Sym, const MCValue &MV,
1204 SmallVectorImpl<char> &OutName, const GlobalValue *GV,
1257 static const GlobalValue *getComdatGVForCOFF(const GlobalValue *GV) {
1257 static const GlobalValue *getComdatGVForCOFF(const GlobalValue *GV) {
1262 const GlobalValue *ComdatGV = GV->getParent()->getNamedValue(ComdatGVName);
1274 static int getSelectionForCOFF(const GlobalValue *GV) {
1276 const GlobalValue *ComdatKey = getComdatGVForCOFF(GV);
1307 const GlobalValue *ComdatGV;
1357 const GlobalValue *ComdatGV;
1406 SmallVectorImpl<char> &OutName, const GlobalValue *GV,
1559 raw_ostream &OS, const GlobalValue *GV) const {
1564 raw_ostream &OS, const GlobalValue *GV) const {
1569 const GlobalValue *LHS, const GlobalValue *RHS,
1569 const GlobalValue *LHS, const GlobalValue *RHS,
1681 static const Comdat *getWasmComdat(const GlobalValue *GV) {
1785 const GlobalValue *LHS, const GlobalValue *RHS,
1785 const GlobalValue *LHS, const GlobalValue *RHS,
1885 const GlobalValue *LHS, const GlobalValue *RHS,
1885 const GlobalValue *LHS, const GlobalValue *RHS,
1893 case GlobalValue::InternalLinkage:
1895 case GlobalValue::ExternalLinkage:
1896 case GlobalValue::CommonLinkage:
1898 case GlobalValue::ExternalWeakLinkage:
lib/ExecutionEngine/ExecutionEngine.cpp 191 std::string ExecutionEngine::getMangledName(const GlobalValue *GV) {
206 void ExecutionEngine::addGlobalMapping(const GlobalValue *GV, void *Addr) {
244 uint64_t ExecutionEngine::updateGlobalMapping(const GlobalValue *GV,
295 void *ExecutionEngine::getPointerToGlobalIfAvailable(const GlobalValue *GV) {
300 const GlobalValue *ExecutionEngine::getGlobalValueAtAddress(void *Addr) {
321 if (GlobalValue *GV = Modules[i]->getNamedValue(Name))
574 void *ExecutionEngine::getPointerToGlobal(const GlobalValue *GV) {
1193 const GlobalValue*> LinkedGlobalsMap;
1203 const GlobalValue *&GVEntry =
1225 std::vector<const GlobalValue*> NonCanonicalGlobals;
1231 if (const GlobalValue *GVEntry =
1260 const GlobalValue *GV = NonCanonicalGlobals[i];
1261 const GlobalValue *CGV =
1274 if (const GlobalValue *GVEntry =
lib/ExecutionEngine/ExecutionEngineBindings.cpp 294 unwrap(EE)->addGlobalMapping(unwrap<GlobalValue>(Global), Addr);
300 return unwrap(EE)->getPointerToGlobal(unwrap<GlobalValue>(Global));
lib/ExecutionEngine/Interpreter/Execution.cpp 2109 } else if (GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
2109 } else if (GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp 22 GV.setLinkage(GlobalValue::ExternalLinkage);
141 for (auto &GV : M.global_values()) {
217 std::vector<const GlobalValue *> GVsToAdd;
222 cast<GlobalValue>(cast<GlobalAlias>(GV)->getAliasee()));
227 if (Partition.count(cast<GlobalValue>(A.getAliasee())))
lib/ExecutionEngine/Orc/ExecutionUtils.cpp 73 if (Data && !isa<GlobalValue>(Data))
104 CtorDtor.Func->setLinkage(GlobalValue::ExternalLinkage);
105 CtorDtor.Func->setVisibility(GlobalValue::HiddenVisibility);
108 if (CtorDtor.Data && cast<GlobalValue>(CtorDtor.Data)->isDeclaration()) {
lib/ExecutionEngine/Orc/IndirectionUtils.cpp 230 auto IP = new GlobalVariable(M, &PT, false, GlobalValue::ExternalLinkage,
232 GlobalValue::NotThreadLocal, 0, true);
233 IP->setVisibility(GlobalValue::HiddenVisibility);
256 std::vector<GlobalValue *> SymbolLinkagePromoter::operator()(Module &M) {
257 std::vector<GlobalValue *> PromotedGlobals;
259 for (auto &GV : M.global_values()) {
273 GV.setLinkage(GlobalValue::ExternalLinkage);
274 GV.setVisibility(GlobalValue::HiddenVisibility);
277 GV.setUnnamedAddr(GlobalValue::UnnamedAddr::None);
lib/ExecutionEngine/Orc/Layer.cpp 34 for (auto &G : M.global_values()) {
70 I->second->setLinkage(GlobalValue::AvailableExternallyLinkage);
lib/ExecutionEngine/Orc/OrcMCJITReplacement.h 276 Ctor.Func->setLinkage(GlobalValue::ExternalLinkage);
277 Ctor.Func->setVisibility(GlobalValue::HiddenVisibility);
284 Dtor.Func->setLinkage(GlobalValue::ExternalLinkage);
285 Dtor.Func->setVisibility(GlobalValue::HiddenVisibility);
lib/ExecutionEngine/Orc/Speculation.cpp 79 M, SpeculatorVTy, false, GlobalValue::LinkageTypes::ExternalLinkage,
96 M, LoadValueTy, false, GlobalValue::LinkageTypes::InternalLinkage,
100 SpeculatorGuard->setUnnamedAddr(GlobalValue::UnnamedAddr::Local);
lib/ExecutionEngine/Orc/ThreadSafeModule.cpp 30 std::set<GlobalValue *> ClonedDefsInSrc;
41 for (auto *GV : ClonedDefsInSrc)
lib/ExecutionEngine/RuntimeDyld/JITSymbol.cpp 21 JITSymbolFlags llvm::JITSymbolFlags::fromGlobalValue(const GlobalValue &GV) {
lib/FuzzMutate/IRMutator.cpp 30 GlobalValue::ExternalLinkage, "f", &M);
lib/IR/AsmWriter.cpp 124 if (C->getNumOperands() && !isa<GlobalValue>(C))
126 if (!isa<BasicBlock>(Op) && !isa<GlobalValue>(Op))
141 if (!isa<GlobalValue>(G.getInitializer()))
146 if (!isa<GlobalValue>(A.getAliasee()))
151 if (!isa<GlobalValue>(I.getResolver()))
157 if (!isa<GlobalValue>(U.get()))
171 if ((isa<Constant>(*Op) && !isa<GlobalValue>(*Op)) ||
330 if (const GlobalValue *GV = dyn_cast<GlobalValue>(V))
330 if (const GlobalValue *GV = dyn_cast<GlobalValue>(V))
459 isa<GlobalValue>(V) ? GlobalPrefix : LocalPrefix);
708 DenseMap<GlobalValue::GUID, unsigned> GUIDMap;
741 int getGlobalSlot(const GlobalValue *V);
745 int getGUIDSlot(GlobalValue::GUID GUID);
779 using guid_iterator = DenseMap<GlobalValue::GUID, unsigned>::iterator;
788 void CreateModuleSlot(const GlobalValue *V);
800 void CreateGUIDSlot(GlobalValue::GUID GUID);
1046 CreateGUIDSlot(GlobalValue::getGUID(TId.first));
1095 int SlotTracker::getGlobalSlot(const GlobalValue *V) {
1143 int SlotTracker::getGUIDSlot(GlobalValue::GUID GUID) {
1162 void SlotTracker::CreateModuleSlot(const GlobalValue *V) {
1227 void SlotTracker::CreateGUIDSlot(GlobalValue::GUID GUID) {
2235 if (CV && !isa<GlobalValue>(CV)) {
2268 if (const GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
2268 if (const GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
2285 if (const GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
2285 if (const GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
2368 DenseMap<const GlobalValueSummary *, GlobalValue::GUID> SummaryToGUIDMap;
2727 auto GUID = GlobalValue::getGUID(TId.first);
2913 static std::string getLinkageName(GlobalValue::LinkageTypes LT) {
2915 case GlobalValue::ExternalLinkage:
2917 case GlobalValue::PrivateLinkage:
2919 case GlobalValue::InternalLinkage:
2921 case GlobalValue::LinkOnceAnyLinkage:
2923 case GlobalValue::LinkOnceODRLinkage:
2925 case GlobalValue::WeakAnyLinkage:
2927 case GlobalValue::WeakODRLinkage:
2929 case GlobalValue::CommonLinkage:
2931 case GlobalValue::AppendingLinkage:
2933 case GlobalValue::ExternalWeakLinkage:
2935 case GlobalValue::AvailableExternallyLinkage:
2944 static std::string getLinkageNameWithSpace(GlobalValue::LinkageTypes LT) {
2945 if (LT == GlobalValue::ExternalLinkage)
3081 GlobalValue::LinkageTypes LT = (GlobalValue::LinkageTypes)GVFlags.Linkage;
3184 static void PrintVisibility(GlobalValue::VisibilityTypes Vis,
3187 case GlobalValue::DefaultVisibility: break;
3188 case GlobalValue::HiddenVisibility: Out << "hidden "; break;
3189 case GlobalValue::ProtectedVisibility: Out << "protected "; break;
3193 static void PrintDSOLocation(const GlobalValue &GV,
3203 static void PrintDLLStorageClass(GlobalValue::DLLStorageClassTypes SCT,
3206 case GlobalValue::DefaultStorageClass: break;
3207 case GlobalValue::DLLImportStorageClass: Out << "dllimport "; break;
3208 case GlobalValue::DLLExportStorageClass: Out << "dllexport "; break;
4310 } else if (const GlobalValue *GV = dyn_cast<GlobalValue>(this)) {
4310 } else if (const GlobalValue *GV = dyn_cast<GlobalValue>(this)) {
4337 if (V.hasName() || isa<GlobalValue>(V) ||
lib/IR/AutoUpgrade.cpp 33 static void rename(GlobalValue *GV) { GV->setName(GV->getName() + ".old"); }
lib/IR/ConstantFold.cpp 1145 isa<GlobalValue>(CE1->getOperand(0))) {
1146 GlobalValue *GV = cast<GlobalValue>(CE1->getOperand(0));
1146 GlobalValue *GV = cast<GlobalValue>(CE1->getOperand(0));
1499 static ICmpInst::Predicate areGlobalsPotentiallyEqual(const GlobalValue *GV1,
1500 const GlobalValue *GV2) {
1541 if (!isa<ConstantExpr>(V1) && !isa<GlobalValue>(V1) &&
1543 if (!isa<GlobalValue>(V2) && !isa<ConstantExpr>(V2) &&
1571 } else if (const GlobalValue *GV = dyn_cast<GlobalValue>(V1)) {
1571 } else if (const GlobalValue *GV = dyn_cast<GlobalValue>(V1)) {
1583 if (const GlobalValue *GV2 = dyn_cast<GlobalValue>(V2)) {
1583 if (const GlobalValue *GV2 = dyn_cast<GlobalValue>(V2)) {
1664 if (const GlobalValue *GV = dyn_cast<GlobalValue>(CE1Op0)) {
1664 if (const GlobalValue *GV = dyn_cast<GlobalValue>(CE1Op0)) {
1684 } else if (const GlobalValue *GV2 = dyn_cast<GlobalValue>(V2)) {
1684 } else if (const GlobalValue *GV2 = dyn_cast<GlobalValue>(V2)) {
1694 } else if (const GlobalValue *GV = dyn_cast<GlobalValue>(CE1Op0)) {
1694 } else if (const GlobalValue *GV = dyn_cast<GlobalValue>(CE1Op0)) {
1721 if (isa<GlobalValue>(CE1Op0) && isa<GlobalValue>(CE2Op0)) {
1721 if (isa<GlobalValue>(CE1Op0) && isa<GlobalValue>(CE2Op0)) {
1726 return areGlobalsPotentiallyEqual(cast<GlobalValue>(CE1Op0),
1727 cast<GlobalValue>(CE2Op0));
1823 if (const GlobalValue *GV = dyn_cast<GlobalValue>(C2))
1823 if (const GlobalValue *GV = dyn_cast<GlobalValue>(C2))
1835 if (const GlobalValue *GV = dyn_cast<GlobalValue>(C1))
1835 if (const GlobalValue *GV = dyn_cast<GlobalValue>(C1))
lib/IR/Constants.cpp 465 bool (*Predicate)(const GlobalValue *)) {
473 if (const auto *GV = dyn_cast<GlobalValue>(WorkItem))
473 if (const auto *GV = dyn_cast<GlobalValue>(WorkItem))
504 if (!UC || isa<GlobalValue>(UC))
514 if (isa<GlobalValue>(this))
539 if (auto *LHSGV = dyn_cast<GlobalValue>(LHSOp0->stripPointerCasts()))
539 if (auto *LHSGV = dyn_cast<GlobalValue>(LHSOp0->stripPointerCasts()))
540 if (auto *RHSGV = dyn_cast<GlobalValue>(RHSOp0->stripPointerCasts()))
540 if (auto *RHSGV = dyn_cast<GlobalValue>(RHSOp0->stripPointerCasts()))
557 if (isa<GlobalValue>(C)) return false; // Cannot remove this
lib/IR/Core.cpp 1821 return wrap(unwrap<GlobalValue>(Global)->getParent());
1825 return unwrap<GlobalValue>(Global)->isDeclaration();
1829 switch (unwrap<GlobalValue>(Global)->getLinkage()) {
1830 case GlobalValue::ExternalLinkage:
1832 case GlobalValue::AvailableExternallyLinkage:
1834 case GlobalValue::LinkOnceAnyLinkage:
1836 case GlobalValue::LinkOnceODRLinkage:
1838 case GlobalValue::WeakAnyLinkage:
1840 case GlobalValue::WeakODRLinkage:
1842 case GlobalValue::AppendingLinkage:
1844 case GlobalValue::InternalLinkage:
1846 case GlobalValue::PrivateLinkage:
1848 case GlobalValue::ExternalWeakLinkage:
1850 case GlobalValue::CommonLinkage:
1858 GlobalValue *GV = unwrap<GlobalValue>(Global);
1858 GlobalValue *GV = unwrap<GlobalValue>(Global);
1862 GV->setLinkage(GlobalValue::ExternalLinkage);
1865 GV->setLinkage(GlobalValue::AvailableExternallyLinkage);
1868 GV->setLinkage(GlobalValue::LinkOnceAnyLinkage);
1871 GV->setLinkage(GlobalValue::LinkOnceODRLinkage);
1879 GV->setLinkage(GlobalValue::WeakAnyLinkage);
1882 GV->setLinkage(GlobalValue::WeakODRLinkage);
1885 GV->setLinkage(GlobalValue::AppendingLinkage);
1888 GV->setLinkage(GlobalValue::InternalLinkage);
1891 GV->setLinkage(GlobalValue::PrivateLinkage);
1894 GV->setLinkage(GlobalValue::PrivateLinkage);
1897 GV->setLinkage(GlobalValue::PrivateLinkage);
1910 GV->setLinkage(GlobalValue::ExternalWeakLinkage);
1917 GV->setLinkage(GlobalValue::CommonLinkage);
1925 return unwrap<GlobalValue>(Global)->getSection().data();
1934 unwrap<GlobalValue>(Global)->getVisibility());
1938 unwrap<GlobalValue>(Global)
1944 unwrap<GlobalValue>(Global)->getDLLStorageClass());
1948 unwrap<GlobalValue>(Global)->setDLLStorageClass(
1953 switch (unwrap<GlobalValue>(Global)->getUnnamedAddr()) {
1965 GlobalValue *GV = unwrap<GlobalValue>(Global);
1965 GlobalValue *GV = unwrap<GlobalValue>(Global);
1978 return unwrap<GlobalValue>(Global)->hasGlobalUnnamedAddr();
1982 unwrap<GlobalValue>(Global)->setUnnamedAddr(
1983 HasUnnamedAddr ? GlobalValue::UnnamedAddr::Global
1984 : GlobalValue::UnnamedAddr::None);
1988 return wrap(unwrap<GlobalValue>(Global)->getValueType());
1995 if (GlobalValue *GV = dyn_cast<GlobalValue>(P))
1995 if (GlobalValue *GV = dyn_cast<GlobalValue>(P))
2070 GlobalValue::ExternalLinkage, nullptr, Name));
2077 GlobalValue::ExternalLinkage, nullptr, Name,
2203 GlobalValue::ExternalLinkage, Name,
2257 GlobalValue::ExternalLinkage, Name, unwrap(M)));
2502 GlobalValue::ExternalLinkage,
lib/IR/DiagnosticInfo.cpp 174 if (isa<llvm::Argument>(V) || isa<GlobalValue>(V))
175 Val = GlobalValue::dropLLVMManglingEscape(V->getName());
lib/IR/Function.cpp 1530 const DenseSet<GlobalValue::GUID> *S) {
1543 const DenseSet<GlobalValue::GUID> *Imports) {
1569 DenseSet<GlobalValue::GUID> Function::getImportGUIDs() const {
1570 DenseSet<GlobalValue::GUID> R;
lib/IR/Globals.cpp 36 static_assert(sizeof(GlobalValue) ==
41 static_assert(sizeof(GlobalObject) == sizeof(GlobalValue) + sizeof(void *),
65 void GlobalValue::copyAttributesFrom(const GlobalValue *Src) {
137 GlobalValue::LinkageTypes Linkage,
147 if (llvm::GlobalValue::isLocalLinkage(Linkage)) {
499 GlobalValue *Aliasee) {
504 GlobalValue *Aliasee) {
510 GlobalAlias *GlobalAlias::create(const Twine &Name, GlobalValue *Aliasee) {
lib/IR/IRBuilder.cpp 48 GlobalValue::PrivateLinkage, StrConstant, Name,
51 GV->setUnnamedAddr(GlobalValue::UnnamedAddr::Global);
lib/IR/LLVMContextImpl.h 1360 DenseMap<const GlobalValue *, StringRef> GlobalValuePartitions;
lib/IR/MDBuilder.cpp 61 const DenseSet<GlobalValue::GUID> *Imports) {
70 SmallVector<GlobalValue::GUID, 2> OrderID(Imports->begin(), Imports->end());
lib/IR/Mangler.cpp 111 void Mangler::getNameWithPrefix(raw_ostream &OS, const GlobalValue *GV,
178 const GlobalValue *GV,
184 void llvm::emitLinkerFlagsForGlobalCOFF(raw_ostream &OS, const GlobalValue *GV,
215 void llvm::emitLinkerFlagsForUsedCOFF(raw_ostream &OS, const GlobalValue *GV,
lib/IR/Module.cpp 113 GlobalValue *Module::getNamedValue(StringRef Name) const {
114 return cast_or_null<GlobalValue>(getValueSymbolTable().lookup(Name));
146 GlobalValue *F = getNamedValue(Name);
394 Error Module::materialize(GlobalValue *GV) {
599 const Module &M, SmallPtrSetImpl<GlobalValue *> &Set, bool CompilerUsed) {
607 GlobalValue *G = cast<GlobalValue>(Op->stripPointerCasts());
607 GlobalValue *G = cast<GlobalValue>(Op->stripPointerCasts());
lib/IR/ModuleSummaryIndex.cpp 94 bool ModuleSummaryIndex::isGUIDLive(GlobalValue::GUID GUID) const {
157 const DenseSet<GlobalValue::GUID> &GUIDPreservedSymbols) {
230 GlobalValue::GUID Src;
231 GlobalValue::GUID Dst;
268 static std::string linkageToString(GlobalValue::LinkageTypes LT) {
270 case GlobalValue::ExternalLinkage:
272 case GlobalValue::AvailableExternallyLinkage:
274 case GlobalValue::LinkOnceAnyLinkage:
276 case GlobalValue::LinkOnceODRLinkage:
278 case GlobalValue::WeakAnyLinkage:
280 case GlobalValue::WeakODRLinkage:
282 case GlobalValue::AppendingLinkage:
284 case GlobalValue::InternalLinkage:
286 case GlobalValue::PrivateLinkage:
288 case GlobalValue::ExternalWeakLinkage:
290 case GlobalValue::CommonLinkage:
316 static std::string getNodeVisualName(GlobalValue::GUID Id) {
342 const ValueInfo &VI, GlobalValue::GUID Id) {
368 DenseMap<GlobalValue::GUID, std::vector<uint64_t>> NodeMap;
369 using GVSOrderedMapTy = std::map<GlobalValue::GUID, GlobalValueSummary *>;
lib/IR/RemarkStreamer.cpp 89 GlobalValue::dropLLVMManglingEscape(Diag.getFunction().getName());
lib/IR/TypeFinder.cpp 129 if (!isa<Constant>(V) || isa<GlobalValue>(V)) return;
lib/IR/Value.cpp 173 } else if (GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
173 } else if (GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
225 if (getContext().shouldDiscardValueNames() && !isa<GlobalValue>(this))
242 if (NameRef.size() > NonGlobalValueMaxNameSize && !isa<GlobalValue>(this))
353 const GlobalValue *GV = dyn_cast<GlobalValue>(this);
353 const GlobalValue *GV = dyn_cast<GlobalValue>(this);
416 if (!isa<GlobalValue>(C)) {
lib/IR/ValueSymbolTable.cpp 50 if (auto *GV = dyn_cast<GlobalValue>(V)) {
50 if (auto *GV = dyn_cast<GlobalValue>(V)) {
lib/IR/Verifier.cpp 399 void visitGlobalValue(const GlobalValue &GV);
564 void Verifier::visitGlobalValue(const GlobalValue &GV) {
724 if (const auto *GV = dyn_cast<GlobalValue>(&C)) {
724 if (const auto *GV = dyn_cast<GlobalValue>(&C)) {
1319 if (const GlobalValue *GV = M.getNamedValue(C.getName()))
1814 const GlobalValue *GV = cast<GlobalValue>(V);
1814 const GlobalValue *GV = cast<GlobalValue>(V);
1891 if (const auto *GV = dyn_cast<GlobalValue>(C)) {
1891 if (const auto *GV = dyn_cast<GlobalValue>(C)) {
4139 } else if (GlobalValue *GV = dyn_cast<GlobalValue>(I.getOperand(i))) {
4139 } else if (GlobalValue *GV = dyn_cast<GlobalValue>(I.getOperand(i))) {
lib/LTO/LTO.cpp 75 const std::map<GlobalValue::GUID, GlobalValue::LinkageTypes> &ResolvedODR,
75 const std::map<GlobalValue::GUID, GlobalValue::LinkageTypes> &ResolvedODR,
77 const std::set<GlobalValue::GUID> &CfiFunctionDefs,
78 const std::set<GlobalValue::GUID> &CfiFunctionDecls) {
168 sizeof(GlobalValue::GUID)));
170 sizeof(GlobalValue::LinkageTypes)));
175 std::set<GlobalValue::GUID> UsedCfiDefs;
176 std::set<GlobalValue::GUID> UsedCfiDecls;
179 std::set<GlobalValue::GUID> UsedTypeIds;
221 GlobalValue::LinkageTypes Linkage = GS.second->linkage();
271 for (GlobalValue::GUID TId : UsedTypeIds) {
303 function_ref<bool(GlobalValue::GUID, const GlobalValueSummary *)>
305 function_ref<void(StringRef, GlobalValue::GUID, GlobalValue::LinkageTypes)>
305 function_ref<void(StringRef, GlobalValue::GUID, GlobalValue::LinkageTypes)>
307 const DenseSet<GlobalValue::GUID> &GUIDPreservedSymbols) {
309 GlobalValue::LinkageTypes OriginalLinkage = S->linkage();
312 if (GlobalValue::isLocalLinkage(OriginalLinkage) ||
313 GlobalValue::isAppendingLinkage(S->linkage()))
324 if (GlobalValue::isLinkOnceLinkage(OriginalLinkage)) {
325 S->setLinkage(GlobalValue::getWeakLinkage(
326 GlobalValue::isLinkOnceODRLinkage(OriginalLinkage)));
343 S->setLinkage(GlobalValue::AvailableExternallyLinkage);
357 function_ref<bool(GlobalValue::GUID, const GlobalValueSummary *)>
359 function_ref<void(StringRef, GlobalValue::GUID, GlobalValue::LinkageTypes)>
359 function_ref<void(StringRef, GlobalValue::GUID, GlobalValue::LinkageTypes)>
361 const DenseSet<GlobalValue::GUID> &GUIDPreservedSymbols) {
380 (VarSummary->linkage() == GlobalValue::WeakODRLinkage ||
381 VarSummary->linkage() == GlobalValue::LinkOnceODRLinkage);
386 GlobalValueSummaryList &GVSummaryList, GlobalValue::GUID GUID,
387 function_ref<bool(StringRef, GlobalValue::GUID)> isExported,
388 function_ref<bool(GlobalValue::GUID, const GlobalValueSummary *)>
392 if (GlobalValue::isLocalLinkage(S->linkage()))
393 S->setLinkage(GlobalValue::ExternalLinkage);
397 !GlobalValue::isLocalLinkage(S->linkage()) &&
398 (!GlobalValue::isInterposableLinkage(S->linkage()) ||
400 S->linkage() != GlobalValue::AppendingLinkage &&
403 S->linkage() != GlobalValue::AvailableExternallyLinkage &&
410 S->setLinkage(GlobalValue::InternalLinkage);
418 function_ref<bool(StringRef, GlobalValue::GUID)> isExported,
419 function_ref<bool(GlobalValue::GUID, const GlobalValueSummary *)>
639 handleNonPrevailingComdat(GlobalValue &GV,
652 GV.setLinkage(GlobalValue::AvailableExternallyLinkage);
718 if (GlobalValue *GV = Msym.dyn_cast<GlobalValue *>()) {
718 if (GlobalValue *GV = Msym.dyn_cast<GlobalValue *>()) {
727 GV->setLinkage(GlobalValue::WeakAnyLinkage);
729 GlobalValue::LinkageTypes OriginalLinkage = GV->getLinkage();
730 if (GlobalValue::isLinkOnceLinkage(OriginalLinkage))
731 GV->setLinkage(GlobalValue::getWeakLinkage(
732 GlobalValue::isLinkOnceODRLinkage(OriginalLinkage)));
743 GV->setLinkage(GlobalValue::AvailableExternallyLinkage);
753 GV->setDLLStorageClass(GlobalValue::DLLStorageClassTypes::
772 for (GlobalValue &GV : M.global_values())
780 std::vector<GlobalValue *> Keep;
781 for (GlobalValue *GV : Mod.Keep) {
792 GlobalValue *CombinedGV =
819 auto GUID = GlobalValue::getGUID(GlobalValue::getGlobalIdentifier(
819 auto GUID = GlobalValue::getGUID(GlobalValue::getGlobalIdentifier(
820 Sym.getIRName(), GlobalValue::ExternalLinkage, ""));
831 S->setLinkage(GlobalValue::WeakAnyLinkage);
899 DenseSet<GlobalValue::GUID> GUIDPreservedSymbols;
900 DenseMap<GlobalValue::GUID, PrevailingType> GUIDPrevailingResolutions;
907 GlobalValue::GUID GUID = GlobalValue::getGUID(
907 GlobalValue::GUID GUID = GlobalValue::getGUID(
908 GlobalValue::dropLLVMManglingEscape(Res.second.IRName));
971 GlobalValue::CommonLinkage,
995 GlobalValue *GV =
1001 GV->setUnnamedAddr(R.second.UnnamedAddr ? GlobalValue::UnnamedAddr::Global
1002 : GlobalValue::UnnamedAddr::None);
1004 GV->setLinkage(GlobalValue::InternalLinkage);
1045 const std::map<GlobalValue::GUID, GlobalValue::LinkageTypes> &ResolvedODR,
1045 const std::map<GlobalValue::GUID, GlobalValue::LinkageTypes> &ResolvedODR,
1055 std::set<GlobalValue::GUID> CfiFunctionDefs;
1056 std::set<GlobalValue::GUID> CfiFunctionDecls;
1072 GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(Name)));
1072 GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(Name)));
1075 GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(Name)));
1075 GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(Name)));
1083 const std::map<GlobalValue::GUID, GlobalValue::LinkageTypes> &ResolvedODR,
1083 const std::map<GlobalValue::GUID, GlobalValue::LinkageTypes> &ResolvedODR,
1120 const std::map<GlobalValue::GUID, GlobalValue::LinkageTypes> &ResolvedODR,
1120 const std::map<GlobalValue::GUID, GlobalValue::LinkageTypes> &ResolvedODR,
1212 const std::map<GlobalValue::GUID, GlobalValue::LinkageTypes> &ResolvedODR,
1212 const std::map<GlobalValue::GUID, GlobalValue::LinkageTypes> &ResolvedODR,
1261 const DenseSet<GlobalValue::GUID> &GUIDPreservedSymbols) {
1292 StringMap<std::map<GlobalValue::GUID, GlobalValue::LinkageTypes>> ResolvedODR;
1292 StringMap<std::map<GlobalValue::GUID, GlobalValue::LinkageTypes>> ResolvedODR;
1297 std::set<GlobalValue::GUID> ExportedGUIDs;
1320 auto GUID = GlobalValue::getGUID(
1321 GlobalValue::dropLLVMManglingEscape(Res.second.IRName));
1331 GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(Def)));
1331 GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(Def)));
lib/LTO/LTOBackend.cpp 462 std::vector<GlobalValue*> DeadGVs;
463 for (auto &GV : Mod.global_values())
472 for (GlobalValue *GV : DeadGVs) {
lib/LTO/LTOCodeGenerator.cpp 387 llvm::function_ref<bool(const GlobalValue &)> mustPreserveGV) {
388 std::vector<GlobalValue *> Used;
lib/LTO/LTOModule.cpp 347 const GlobalValue *V = Sym.get<GlobalValue *>();
347 const GlobalValue *V = Sym.get<GlobalValue *>();
351 void LTOModule::addDefinedDataSymbol(StringRef Name, const GlobalValue *v) {
405 const Function *F = cast<Function>(Sym.get<GlobalValue *>());
414 void LTOModule::addDefinedSymbol(StringRef Name, const GlobalValue *def,
555 const GlobalValue *decl = Sym.dyn_cast<GlobalValue *>();
555 const GlobalValue *decl = Sym.dyn_cast<GlobalValue *>();
568 auto *GV = Sym.dyn_cast<GlobalValue *>();
568 auto *GV = Sym.dyn_cast<GlobalValue *>();
lib/LTO/ThinLTOCodeGenerator.cpp 107 return !GlobalValue::isAvailableExternallyLinkage(Linkage) &&
108 !GlobalValue::isWeakForLinker(Linkage);
117 return !GlobalValue::isAvailableExternallyLinkage(Linkage);
130 DenseMap<GlobalValue::GUID, const GlobalValueSummary *> &PrevailingCopy) {
260 DenseSet<GlobalValue::GUID> &PreservedGUID) {
263 PreservedGUID.insert(GlobalValue::getGUID(Sym.getIRName()));
268 static DenseSet<GlobalValue::GUID>
271 DenseSet<GlobalValue::GUID> GUIDPreservedSymbols(PreservedSymbols.size());
276 GUIDPreservedSymbols.insert(GlobalValue::getGUID(Name));
317 const std::map<GlobalValue::GUID, GlobalValue::LinkageTypes> &ResolvedODR,
317 const std::map<GlobalValue::GUID, GlobalValue::LinkageTypes> &ResolvedODR,
403 const DenseSet<GlobalValue::GUID> &GUIDPreservedSymbols,
465 StringMap<std::map<GlobalValue::GUID, GlobalValue::LinkageTypes>>
465 StringMap<std::map<GlobalValue::GUID, GlobalValue::LinkageTypes>>
467 const DenseSet<GlobalValue::GUID> &GUIDPreservedSymbols,
468 const DenseMap<GlobalValue::GUID, const GlobalValueSummary *>
586 const DenseSet<GlobalValue::GUID> &GUIDPreservedSymbols;
589 const DenseSet<GlobalValue::GUID> &GUIDPreservedSymbols)
592 bool operator()(StringRef ModuleIdentifier, GlobalValue::GUID GUID) const {
601 const DenseMap<GlobalValue::GUID, const GlobalValueSummary *> &PrevailingCopy;
602 IsPrevailing(const DenseMap<GlobalValue::GUID, const GlobalValueSummary *>
606 bool operator()(GlobalValue::GUID GUID, const GlobalValueSummary *S) const {
618 const DenseSet<GlobalValue::GUID> &GUIDPreservedSymbols) {
658 DenseMap<GlobalValue::GUID, const GlobalValueSummary *> PrevailingCopy;
662 StringMap<std::map<GlobalValue::GUID, GlobalValue::LinkageTypes>> ResolvedODR;
662 StringMap<std::map<GlobalValue::GUID, GlobalValue::LinkageTypes>> ResolvedODR;
820 DenseMap<GlobalValue::GUID, const GlobalValueSummary *> PrevailingCopy;
824 StringMap<std::map<GlobalValue::GUID, GlobalValue::LinkageTypes>> ResolvedODR;
824 StringMap<std::map<GlobalValue::GUID, GlobalValue::LinkageTypes>> ResolvedODR;
977 std::set<GlobalValue::GUID> ExportedGUIDs;
993 StringMap<std::map<GlobalValue::GUID, GlobalValue::LinkageTypes>> ResolvedODR;
993 StringMap<std::map<GlobalValue::GUID, GlobalValue::LinkageTypes>> ResolvedODR;
995 DenseMap<GlobalValue::GUID, const GlobalValueSummary *> PrevailingCopy;
lib/LTO/UpdateCompilerUsed.cpp 30 std::vector<GlobalValue *> &LLVMUsed)
53 std::vector<GlobalValue *> &LLVMUsed;
88 void findLibCallsAndAsm(GlobalValue &GV) {
103 GlobalValue *FuncAliasee = nullptr;
124 std::vector<GlobalValue *> UsedValues;
lib/Linker/IRMover.cpp 387 std::function<void(GlobalValue &, IRMover::ValueAdder)> AddLazyFor;
403 DenseSet<GlobalValue *> ValuesToLink;
404 std::vector<GlobalValue *> Worklist;
405 std::vector<std::pair<GlobalValue *, Value*>> RAUWWorklist;
407 void maybeAdd(GlobalValue *GV) {
444 GlobalValue *copyGlobalValueProto(const GlobalValue *SGV, bool ForDefinition);
444 GlobalValue *copyGlobalValueProto(const GlobalValue *SGV, bool ForDefinition);
452 GlobalValue *getLinkedToGlobal(const GlobalValue *SrcGV) {
452 GlobalValue *getLinkedToGlobal(const GlobalValue *SrcGV) {
459 GlobalValue *DGV = DstM.getNamedValue(SrcGV->getName());
482 bool shouldLink(GlobalValue *DGV, GlobalValue &SGV);
482 bool shouldLink(GlobalValue *DGV, GlobalValue &SGV);
483 Expected<Constant *> linkGlobalValueProto(GlobalValue *GV,
492 Error linkGlobalValueBody(GlobalValue &Dst, GlobalValue &Src);
492 Error linkGlobalValueBody(GlobalValue &Dst, GlobalValue &Src);
502 GlobalValue *copyGlobalIndirectSymbolProto(const GlobalIndirectSymbol *SGIS);
521 ArrayRef<GlobalValue *> ValuesToLink,
522 std::function<void(GlobalValue &, IRMover::ValueAdder)> AddLazyFor,
532 for (GlobalValue *GV : ValuesToLink)
547 static void forceRenaming(GlobalValue *GV, StringRef Name) {
556 if (GlobalValue *ConflictGV = M->getNamedValue(Name)) {
574 auto *SGV = dyn_cast<GlobalValue>(V);
574 auto *SGV = dyn_cast<GlobalValue>(V);
586 GlobalValue *New = dyn_cast<GlobalValue>(*NewProto);
586 GlobalValue *New = dyn_cast<GlobalValue>(*NewProto);
628 SGVar->isConstant(), GlobalValue::ExternalLinkage,
659 GlobalValue::ExternalLinkage, SF->getName(), &DstM);
667 GlobalValue *
675 GlobalValue::ExternalLinkage, SGIS->getName(),
679 GlobalValue::ExternalLinkage, SGIS->getName(),
685 GlobalValue *IRLinker::copyGlobalValueProto(const GlobalValue *SGV,
685 GlobalValue *IRLinker::copyGlobalValueProto(const GlobalValue *SGV,
687 GlobalValue *NewGV;
698 GlobalValue::ExternalLinkage, SGV->getName(), &DstM);
702 /*isConstant*/ false, GlobalValue::ExternalLinkage,
711 NewGV->setLinkage(GlobalValue::ExternalWeakLinkage);
744 for (GlobalValue &SGV : SrcM->globals()) {
745 GlobalValue *DGV = getLinkedToGlobal(&SGV);
760 for (GlobalValue &SGV : *SrcM)
761 if (GlobalValue *DGV = getLinkedToGlobal(&SGV)) {
774 for (GlobalValue &SGV : SrcM->aliases())
775 if (GlobalValue *DGV = getLinkedToGlobal(&SGV))
905 auto *Key =
906 dyn_cast<GlobalValue>(E->getAggregateElement(2)->stripPointerCasts());
909 GlobalValue *DGV = getLinkedToGlobal(Key);
942 bool IRLinker::shouldLink(GlobalValue *DGV, GlobalValue &SGV) {
942 bool IRLinker::shouldLink(GlobalValue *DGV, GlobalValue &SGV) {
962 Expected<Constant *> IRLinker::linkGlobalValueProto(GlobalValue *SGV,
964 GlobalValue *DGV = getLinkedToGlobal(SGV);
988 GlobalValue *NewGV;
1021 NewGV->setLinkage(GlobalValue::InternalLinkage);
1089 Error IRLinker::linkGlobalValueBody(GlobalValue &Dst, GlobalValue &Src) {
1089 Error IRLinker::linkGlobalValueBody(GlobalValue &Dst, GlobalValue &Src) {
1102 GlobalValue *Old;
1431 GlobalValue *GV = Worklist.back();
1556 std::unique_ptr<Module> Src, ArrayRef<GlobalValue *> ValuesToLink,
1557 std::function<void(GlobalValue &, ValueAdder Add)> AddLazyFor,
lib/Linker/LinkModules.cpp 33 SetVector<GlobalValue *> ValuesToLink;
50 void addLazyFor(GlobalValue &GV, const IRMover::ValueAdder &Add);
55 bool shouldLinkFromSource(bool &LinkFromSrc, const GlobalValue &Dest,
56 const GlobalValue &Src);
76 DenseMap<const Comdat *, std::vector<GlobalValue *>> LazyComdatMembers;
80 GlobalValue *getLinkedToGlobal(const GlobalValue *SrcGV) {
80 GlobalValue *getLinkedToGlobal(const GlobalValue *SrcGV) {
84 if (!SrcGV->hasName() || GlobalValue::isLocalLinkage(SrcGV->getLinkage()))
88 GlobalValue *DGV = DstM.getNamedValue(SrcGV->getName());
103 void dropReplacedComdat(GlobalValue &GV,
106 bool linkIfNeeded(GlobalValue &GV);
119 static GlobalValue::VisibilityTypes
120 getMinVisibility(GlobalValue::VisibilityTypes A,
121 GlobalValue::VisibilityTypes B) {
122 if (A == GlobalValue::HiddenVisibility || B == GlobalValue::HiddenVisibility)
122 if (A == GlobalValue::HiddenVisibility || B == GlobalValue::HiddenVisibility)
123 return GlobalValue::HiddenVisibility;
124 if (A == GlobalValue::ProtectedVisibility ||
125 B == GlobalValue::ProtectedVisibility)
126 return GlobalValue::ProtectedVisibility;
127 return GlobalValue::DefaultVisibility;
132 const GlobalValue *GVal = M.getNamedValue(ComdatName);
241 const GlobalValue &Dest,
242 const GlobalValue &Src) {
328 bool ModuleLinker::linkIfNeeded(GlobalValue &GV) {
329 GlobalValue *DGV = getLinkedToGlobal(&GV);
361 GlobalValue::VisibilityTypes Visibility =
366 GlobalValue::UnnamedAddr UnnamedAddr = GlobalValue::getMinUnnamedAddr(
366 GlobalValue::UnnamedAddr UnnamedAddr = GlobalValue::getMinUnnamedAddr(
396 void ModuleLinker::addLazyFor(GlobalValue &GV, const IRMover::ValueAdder &Add) {
409 for (GlobalValue *GV2 : LazyComdatMembers[SC]) {
410 GlobalValue *DGV = getLinkedToGlobal(GV2);
423 GlobalValue &GV, const DenseSet<const Comdat *> &ReplacedDstComdats) {
442 GlobalValue *Declaration;
444 Declaration = Function::Create(FTy, GlobalValue::ExternalLinkage, "", &M);
448 GlobalValue::ExternalLinkage,
531 GlobalValue *GV = ValuesToLink[I];
535 for (GlobalValue *GV2 : LazyComdatMembers[SC]) {
536 GlobalValue *DGV = getLinkedToGlobal(GV2);
546 for (GlobalValue *GV : ValuesToLink)
lib/Object/IRSymtab.cpp 111 const SmallPtrSet<GlobalValue *, 8> &Used,
122 SmallPtrSet<GlobalValue *, 8> Used;
171 const GlobalValue *GV = M->getNamedValue(C->getName());
196 const SmallPtrSet<GlobalValue *, 8> &Used,
239 auto *GV = Msym.dyn_cast<GlobalValue *>();
239 auto *GV = Msym.dyn_cast<GlobalValue *>();
288 auto *Fallback = dyn_cast<GlobalValue>(
288 auto *Fallback = dyn_cast<GlobalValue>(
lib/Object/ModuleSymbolTable.cpp 62 for (GlobalValue &GV : M->global_values())
177 auto *GV = S.get<GlobalValue *>();
177 auto *GV = S.get<GlobalValue *>();
188 auto *GV = S.get<GlobalValue *>();
188 auto *GV = S.get<GlobalValue *>();
lib/Object/RecordStreamer.cpp 138 StringMap<const GlobalValue *> MangledNameMap;
143 for (const GlobalValue &GV : M.global_values()) {
188 const GlobalValue *GV = M.getNamedValue(Aliasee->getName());
lib/ProfileData/InstrProf.cpp 216 GlobalValue::LinkageTypes Linkage,
219 return GlobalValue::getGlobalIdentifier(RawFuncName, Linkage, FileName);
273 return getPGOFuncName(F.getName(), GlobalValue::ExternalLinkage, "");
288 GlobalValue::LinkageTypes Linkage) {
292 if (!GlobalValue::isLocalLinkage(Linkage))
306 GlobalValue::LinkageTypes Linkage,
311 if (Linkage == GlobalValue::ExternalWeakLinkage)
312 Linkage = GlobalValue::LinkOnceAnyLinkage;
313 else if (Linkage == GlobalValue::AvailableExternallyLinkage)
314 Linkage = GlobalValue::LinkOnceODRLinkage;
315 else if (Linkage == GlobalValue::InternalLinkage ||
316 Linkage == GlobalValue::ExternalLinkage)
317 Linkage = GlobalValue::PrivateLinkage;
326 if (!GlobalValue::isLocalLinkage(FuncNameVar->getLinkage()))
327 FuncNameVar->setVisibility(GlobalValue::HiddenVisibility);
1061 GlobalValue::LinkageTypes Linkage = F.getLinkage();
1062 if (Linkage != GlobalValue::ExternalWeakLinkage &&
1063 Linkage != GlobalValue::AvailableExternallyLinkage)
1099 if (!GlobalValue::isDiscardableIfUnused(F.getLinkage()))
1140 M, IntTy64, true, GlobalValue::WeakAnyLinkage,
1142 IRLevelVersionVariable->setVisibility(GlobalValue::DefaultVisibility);
1145 IRLevelVersionVariable->setLinkage(GlobalValue::ExternalLinkage);
1157 M, ProfileNameConst->getType(), true, GlobalValue::WeakAnyLinkage,
1161 ProfileNameVar->setLinkage(GlobalValue::ExternalLinkage);
lib/Target/AArch64/AArch64CallLowering.cpp 722 const GlobalValue *GV = Info.Callee.getGlobal();
lib/Target/AArch64/AArch64FastISel.cpp 97 const GlobalValue *GV = nullptr;
142 void setGlobalValue(const GlobalValue *G) { GV = G; }
143 const GlobalValue *getGlobalValue() { return GV; }
277 unsigned materializeGV(const GlobalValue *GV);
454 unsigned AArch64FastISel::materializeGV(const GlobalValue *GV) {
543 else if (const GlobalValue *GV = dyn_cast<GlobalValue>(C))
543 else if (const GlobalValue *GV = dyn_cast<GlobalValue>(C))
963 if (const GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
963 if (const GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
lib/Target/AArch64/AArch64ISelDAGToDAG.cpp 800 const GlobalValue *GV = GAN->getGlobal();
lib/Target/AArch64/AArch64ISelLowering.cpp 3601 const GlobalValue *GV = G->getGlobal();
4035 const GlobalValue *GV = G->getGlobal();
4361 const GlobalValue *GV = GN->getGlobal();
4427 const GlobalValue *GV = cast<GlobalAddressSDNode>(Op)->getGlobal();
4526 const GlobalValue *GV = GA->getGlobal();
4644 const GlobalValue *GV = GA->getGlobal();
11703 const GlobalValue *GV = GN->getGlobal();
lib/Target/AArch64/AArch64InstrInfo.cpp 1502 const GlobalValue *GV =
1503 cast<GlobalValue>((*MI.memoperands_begin())->getValue());
lib/Target/AArch64/AArch64InstructionSelector.cpp 1135 if (auto *GV = dyn_cast<GlobalValue>(V)) {
2376 const GlobalValue &GV = *I.getOperand(1).getGlobal();
lib/Target/AArch64/AArch64MCInstLower.cpp 38 const GlobalValue *GV = MO.getGlobal();
123 const GlobalValue *GV = MO.getGlobal();
lib/Target/AArch64/AArch64PromoteConstant.cpp 475 *F.getParent(), C.getType(), true, GlobalValue::InternalLinkage, nullptr,
554 if (!Cst || isa<GlobalValue>(Cst) || isa<ConstantExpr>(Cst))
lib/Target/AArch64/AArch64Subtarget.cpp 214 AArch64Subtarget::ClassifyGlobalReference(const GlobalValue *GV,
247 const GlobalValue *GV, const TargetMachine &TM) const {
lib/Target/AArch64/AArch64Subtarget.h 468 unsigned ClassifyGlobalReference(const GlobalValue *GV,
471 unsigned classifyGlobalFunctionReference(const GlobalValue *GV,
lib/Target/AArch64/AArch64TargetObjectFile.cpp 35 const GlobalValue *GV, unsigned Encoding, const TargetMachine &TM,
56 const GlobalValue *GV, const TargetMachine &TM,
62 const GlobalValue *GV, const MCSymbol *Sym, const MCValue &MV,
77 SmallVectorImpl<char> &OutName, const GlobalValue *GV,
lib/Target/AArch64/AArch64TargetObjectFile.h 28 const MCExpr *getTTypeGlobalReference(const GlobalValue *GV,
34 MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV,
38 const MCExpr *getIndirectSymViaGOTPCRel(const GlobalValue *GV,
44 void getNameWithPrefix(SmallVectorImpl<char> &OutName, const GlobalValue *GV,
lib/Target/AMDGPU/AMDGPUAlwaysInlinePass.cpp 35 void recursivelyVisitUsers(GlobalValue &GV,
57 GlobalValue &GV,
lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp 136 if (isa<Argument>(Ptr) || isa<GlobalValue>(Ptr)) {
lib/Target/AMDGPU/AMDGPUISelLowering.cpp 1183 bool AMDGPUTargetLowering::hasDefinedInitializer(const GlobalValue *GV) {
1197 const GlobalValue *GV = G->getGlobal();
lib/Target/AMDGPU/AMDGPUISelLowering.h 41 static bool hasDefinedInitializer(const GlobalValue *GV);
lib/Target/AMDGPU/AMDGPUInstrInfo.cpp 39 isa<Constant>(Ptr) || isa<GlobalValue>(Ptr))
lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp 1520 isa<Constant>(Ptr) || isa<GlobalValue>(Ptr))
lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp 1580 MachineIRBuilder &B, const GlobalValue *GV,
1641 const GlobalValue *GV = MI.getOperand(1).getGlobal();
lib/Target/AMDGPU/AMDGPULegalizerInfo.h 63 Register DstReg, LLT PtrTy, MachineIRBuilder &B, const GlobalValue *GV,
lib/Target/AMDGPU/AMDGPUMCInstLower.cpp 149 const GlobalValue *GV = MO.getGlobal();
lib/Target/AMDGPU/AMDGPUMachineFunction.cpp 45 const GlobalValue &GV) {
lib/Target/AMDGPU/AMDGPUMachineFunction.h 22 SmallDenseMap<const GlobalValue *, unsigned, 4> LocalMemoryObjects;
72 unsigned allocateLDSGlobal(const DataLayout &DL, const GlobalValue &GV);
lib/Target/AMDGPU/AMDGPUOpenCLEnqueuedBlockLowering.cpp 122 /*isConstant=*/false, GlobalValue::ExternalLinkage,
124 /*InsertBefore=*/nullptr, GlobalValue::NotThreadLocal,
138 F.setLinkage(GlobalValue::ExternalLinkage);
lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp 244 AM.BaseGV = dyn_cast_or_null<GlobalValue>(const_cast<Value *>(Ptr));
lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp 797 *Mod, GVTy, false, GlobalValue::InternalLinkage,
803 GV->setUnnamedAddr(GlobalValue::UnnamedAddr::Global);
lib/Target/AMDGPU/AMDGPUPropagateAttributes.cpp 281 F.setVisibility(GlobalValue::DefaultVisibility);
282 F.setLinkage(GlobalValue::InternalLinkage);
lib/Target/AMDGPU/AMDGPUTargetMachine.cpp 386 static bool mustPreserveGV(const GlobalValue &GV) {
lib/Target/AMDGPU/R600ISelLowering.cpp 748 const GlobalValue *GV = GSD->getGlobal();
lib/Target/AMDGPU/SIISelLowering.cpp 2925 const GlobalValue *GV = GSD->getGlobal();
4410 bool SITargetLowering::shouldEmitFixup(const GlobalValue *GV) const {
4417 bool SITargetLowering::shouldEmitGOTReloc(const GlobalValue *GV) const {
4428 bool SITargetLowering::shouldEmitPCReloc(const GlobalValue *GV) const {
5019 buildPCRelGlobalAddress(SelectionDAG &DAG, const GlobalValue *GV,
5068 const GlobalValue *GV = GSD->getGlobal();
6061 const GlobalValue *GV =
lib/Target/AMDGPU/SIISelLowering.h 192 bool shouldEmitFixup(const GlobalValue *GV) const;
196 bool shouldEmitGOTReloc(const GlobalValue *GV) const;
200 bool shouldEmitPCReloc(const GlobalValue *GV) const;
lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp 544 bool isGroupSegment(const GlobalValue *GV) {
548 bool isGlobalSegment(const GlobalValue *GV) {
552 bool isReadOnlySegment(const GlobalValue *GV) {
lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h 311 bool isGroupSegment(const GlobalValue *GV);
312 bool isGlobalSegment(const GlobalValue *GV);
313 bool isReadOnlySegment(const GlobalValue *GV);
lib/Target/ARC/ARCISelLowering.cpp 726 const GlobalValue *GV = GN->getGlobal();
lib/Target/ARM/ARMAsmPrinter.cpp 83 const GlobalValue *GV = dyn_cast<GlobalValue>(CV->stripPointerCasts());
83 const GlobalValue *GV = dyn_cast<GlobalValue>(CV->stripPointerCasts());
802 MCSymbol *ARMAsmPrinter::GetARMGVSymbol(const GlobalValue *GV,
894 const GlobalValue *GV = cast<ARMConstantPoolConstant>(ACPV)->getGV();
1381 const GlobalValue *GV = Op.getGlobal();
1399 const GlobalValue *GV = MI->getOperand(1).getGlobal();
1432 const GlobalValue *GV = MI->getOperand(2).getGlobal();
1478 const GlobalValue *GV = MI->getOperand(1).getGlobal();
lib/Target/ARM/ARMAsmPrinter.h 148 MCSymbol *GetARMGVSymbol(const GlobalValue *GV, unsigned char TargetFlags);
lib/Target/ARM/ARMBaseInstrInfo.cpp 4776 const GlobalValue *GV =
4777 cast<GlobalValue>((*MI->memoperands_begin())->getValue());
lib/Target/ARM/ARMConstantPoolValue.cpp 160 ARMConstantPoolConstant::Create(const GlobalValue *GV,
183 const GlobalValue *ARMConstantPoolConstant::getGV() const {
184 return dyn_cast_or_null<GlobalValue>(CVal);
lib/Target/ARM/ARMConstantPoolValue.h 163 static ARMConstantPoolConstant *Create(const GlobalValue *GV,
176 const GlobalValue *getGV() const;
lib/Target/ARM/ARMExpandPseudoInsts.cpp 900 const GlobalValue *GV = MO.getGlobal();
1476 const GlobalValue *GV = MO1.getGlobal();
1533 const GlobalValue *GV = MO1.getGlobal();
lib/Target/ARM/ARMFastISel.cpp 208 unsigned ARMMaterializeGV(const GlobalValue *GV, MVT VT);
212 unsigned ARMLowerPICELF(const GlobalValue *GV, unsigned Align, MVT VT);
537 unsigned ARMFastISel::ARMMaterializeGV(const GlobalValue *GV, MVT VT) {
651 else if (const GlobalValue *GV = dyn_cast<GlobalValue>(C))
651 else if (const GlobalValue *GV = dyn_cast<GlobalValue>(C))
2190 GlobalValue *GV = new GlobalVariable(M, Type::getInt32Ty(*Context), false,
2191 GlobalValue::ExternalLinkage, nullptr,
2391 const GlobalValue *GV = dyn_cast<GlobalValue>(Callee);
2391 const GlobalValue *GV = dyn_cast<GlobalValue>(Callee);
2948 unsigned ARMFastISel::ARMLowerPICELF(const GlobalValue *GV,
lib/Target/ARM/ARMISelLowering.cpp 2272 const GlobalValue *GV = nullptr;
2593 const GlobalValue *GV = G->getGlobal();
3003 SDValue GA = DAG.getTargetGlobalAddress(dyn_cast<GlobalValue>(GV),
3221 const GlobalValue *GV = GA->getGlobal();
3318 const GlobalValue *GV, SelectionDAG &DAG,
3414 bool ARMTargetLowering::isReadOnly(const GlobalValue *GV) const {
3440 const GlobalValue *GV = cast<GlobalAddressSDNode>(Op)->getGlobal();
3508 const GlobalValue *GV = cast<GlobalAddressSDNode>(Op)->getGlobal();
3536 const GlobalValue *GV = cast<GlobalAddressSDNode>(Op)->getGlobal();
lib/Target/ARM/ARMISelLowering.h 318 bool isReadOnly(const GlobalValue *GV) const;
lib/Target/ARM/ARMInstrInfo.cpp 110 const GlobalValue *GV =
111 cast<GlobalValue>((*MI->memoperands_begin())->getValue());
lib/Target/ARM/ARMSubtarget.cpp 346 bool ARMSubtarget::isGVIndirectSymbol(const GlobalValue *GV) const {
360 bool ARMSubtarget::isGVInGOT(const GlobalValue *GV) const {
lib/Target/ARM/ARMSubtarget.h 840 bool isGVIndirectSymbol(const GlobalValue *GV) const;
843 bool isGVInGOT(const GlobalValue *GV) const;
lib/Target/ARM/ARMTargetObjectFile.cpp 57 const GlobalValue *GV, unsigned Encoding, const TargetMachine &TM,
lib/Target/ARM/ARMTargetObjectFile.h 26 const MCExpr *getTTypeGlobalReference(const GlobalValue *GV,
lib/Target/AVR/AVRExpandPseudoInsts.cpp 291 const GlobalValue *GV = MI.getOperand(2).getGlobal();
502 const GlobalValue *GV = MI.getOperand(1).getGlobal();
551 const GlobalValue *GV = MI.getOperand(1).getGlobal();
983 const GlobalValue *GV = MI.getOperand(0).getGlobal();
lib/Target/AVR/AVRISelLowering.cpp 402 const GlobalValue *GV = cast<GlobalAddressSDNode>(Op)->getGlobal();
1173 const GlobalValue *GV = G->getGlobal();
lib/Target/BPF/BPFAbstractMemberAccess.cpp 236 const auto *GV = dyn_cast<GlobalValue>(Call->getCalledValue());
236 const auto *GV = dyn_cast<GlobalValue>(Call->getCalledValue());
lib/Target/BPF/BPFISelLowering.cpp 557 const GlobalValue *GV = N->getGlobal();
lib/Target/BPF/BPFMISimplifyPatchable.cpp 111 const GlobalValue *GVal = MO.getGlobal();
lib/Target/BPF/BTFDebug.cpp 990 const GlobalValue *GVal = MO.getGlobal();
1098 if (Linkage != GlobalValue::InternalLinkage &&
1099 (Linkage != GlobalValue::ExternalLinkage || !Global.hasSection()))
1102 uint32_t GVarInfo = Linkage == GlobalValue::ExternalLinkage
1127 const GlobalValue *GVal = MO.getGlobal();
lib/Target/Hexagon/HexagonConstExtenders.cpp 342 const GlobalValue *GV; // MO_GlobalAddress
lib/Target/Hexagon/HexagonOptAddrMode.cpp 510 const GlobalValue *GV = ImmOp.getGlobal();
567 const GlobalValue *GV = ImmOp.getGlobal();
643 const GlobalValue *GV = ImmOp.getGlobal();
650 const GlobalValue *GV = ImmOp.getGlobal();
lib/Target/Hexagon/HexagonTargetObjectFile.cpp 290 const GlobalValue *GV, const TargetMachine &TM) const {
lib/Target/Hexagon/HexagonTargetObjectFile.h 44 unsigned getSmallestAddressableSize(const Type *Ty, const GlobalValue *GV,
lib/Target/Lanai/LanaiISelLowering.cpp 1161 const GlobalValue *GV = cast<GlobalAddressSDNode>(Op)->getGlobal();
lib/Target/MSP430/MSP430ISelDAGToDAG.cpp 48 const GlobalValue *GV;
lib/Target/MSP430/MSP430ISelLowering.cpp 998 const GlobalValue *GV = cast<GlobalAddressSDNode>(Op)->getGlobal();
lib/Target/Mips/MipsFastISel.cpp 98 const GlobalValue *GV = nullptr;
131 void setGlobalValue(const GlobalValue *G) { GV = G; }
132 const GlobalValue *getGlobalValue() { return GV; }
205 unsigned materializeGV(const GlobalValue *GV, MVT VT);
411 unsigned MipsFastISel::materializeGV(const GlobalValue *GV, MVT VT) {
457 else if (const GlobalValue *GV = dyn_cast<GlobalValue>(C))
457 else if (const GlobalValue *GV = dyn_cast<GlobalValue>(C))
582 if (const GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
582 if (const GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
lib/Target/Mips/MipsISelLowering.cpp 1957 const GlobalValue *GV = N->getGlobal();
2024 const GlobalValue *GV = GA->getGlobal();
3266 const GlobalValue *Val = G->getGlobal();
lib/Target/Mips/MipsInstructionSelector.cpp 552 const llvm::GlobalValue *GVal = I.getOperand(1).getGlobal();
lib/Target/Mips/MipsMachineFunction.cpp 87 const GlobalValue *FName = &MF.getFunction();
116 const GlobalValue *FName = &MF.getFunction();
188 MachinePointerInfo MipsFunctionInfo::callPtrInfo(const GlobalValue *GV) {
lib/Target/Mips/MipsMachineFunction.h 74 MachinePointerInfo callPtrInfo(const GlobalValue *GV);
lib/Target/NVPTX/NVPTXAsmPrinter.cpp 964 void NVPTXAsmPrinter::emitLinkageDirective(const GlobalValue *V,
1724 if (const GlobalValue *GVar = dyn_cast<GlobalValue>(CPV)) {
1724 if (const GlobalValue *GVar = dyn_cast<GlobalValue>(CPV)) {
1745 if (const GlobalValue *GVar = dyn_cast<GlobalValue>(v)) {
1745 if (const GlobalValue *GVar = dyn_cast<GlobalValue>(v)) {
1883 if (const GlobalValue *GVar = dyn_cast<GlobalValue>(CPV)) {
1883 if (const GlobalValue *GVar = dyn_cast<GlobalValue>(CPV)) {
1980 if (const GlobalValue *GV = dyn_cast<GlobalValue>(CV)) {
1980 if (const GlobalValue *GV = dyn_cast<GlobalValue>(CV)) {
lib/Target/NVPTX/NVPTXAsmPrinter.h 161 if (const GlobalValue *GVar = dyn_cast<GlobalValue>(v)) {
161 if (const GlobalValue *GVar = dyn_cast<GlobalValue>(v)) {
266 void emitLinkageDirective(const GlobalValue *V, raw_ostream &O);
lib/Target/NVPTX/NVPTXReplaceImageHandles.cpp 170 const GlobalValue *GV = TexHandleDef.getOperand(1).getGlobal();
lib/Target/NVPTX/NVPTXUtilities.cpp 34 typedef std::map<const GlobalValue *, key_val_pair_t> global_val_annot_t;
72 static void cacheAnnotationFromMD(const Module *m, const GlobalValue *gv) {
81 GlobalValue *entity =
82 mdconst::dyn_extract_or_null<GlobalValue>(elem->getOperand(0));
105 bool findOneNVVMAnnotation(const GlobalValue *gv, const std::string &prop,
119 bool findAllNVVMAnnotation(const GlobalValue *gv, const std::string &prop,
134 if (const GlobalValue *gv = dyn_cast<GlobalValue>(&val)) {
134 if (const GlobalValue *gv = dyn_cast<GlobalValue>(&val)) {
145 if (const GlobalValue *gv = dyn_cast<GlobalValue>(&val)) {
145 if (const GlobalValue *gv = dyn_cast<GlobalValue>(&val)) {
158 if (const GlobalValue *gv = dyn_cast<GlobalValue>(&val)) {
158 if (const GlobalValue *gv = dyn_cast<GlobalValue>(&val)) {
217 if(const GlobalValue *gv = dyn_cast<GlobalValue>(&val)) {
217 if(const GlobalValue *gv = dyn_cast<GlobalValue>(&val)) {
lib/Target/NVPTX/NVPTXUtilities.h 29 bool findOneNVVMAnnotation(const GlobalValue *, const std::string &,
31 bool findAllNVVMAnnotation(const GlobalValue *, const std::string &,
lib/Target/PowerPC/PPCAsmPrinter.cpp 184 const GlobalValue *GV = MO.getGlobal();
453 const GlobalValue *GValue = CalleeMO.getGlobal();
505 const GlobalValue *GValue = MO.getGlobal();
925 const GlobalValue *GValue = MO.getGlobal();
944 const GlobalValue *GValue = MO.getGlobal();
1004 const GlobalValue *GValue = MO.getGlobal();
1022 const GlobalValue *GValue = MO.getGlobal();
1049 const GlobalValue *GValue = MO.getGlobal();
1067 const GlobalValue *GValue = MO.getGlobal();
1096 const GlobalValue *GValue = MO.getGlobal();
1116 const GlobalValue *GValue = MO.getGlobal();
lib/Target/PowerPC/PPCFastISel.cpp 175 unsigned PPCMaterializeGV(const GlobalValue *GV, MVT VT);
1646 const GlobalValue *GV = dyn_cast<GlobalValue>(Callee);
1646 const GlobalValue *GV = dyn_cast<GlobalValue>(Callee);
2058 unsigned PPCFastISel::PPCMaterializeGV(const GlobalValue *GV, MVT VT) {
2250 else if (const GlobalValue *GV = dyn_cast<GlobalValue>(C))
2250 else if (const GlobalValue *GV = dyn_cast<GlobalValue>(C))
lib/Target/PowerPC/PPCISelDAGToDAG.cpp 6485 const GlobalValue *GV = GA->getGlobal();
6551 const GlobalValue *GV = GA->getGlobal();
lib/Target/PowerPC/PPCISelLowering.cpp 2639 const GlobalValue *GV = nullptr) {
2849 const GlobalValue *GV = GA->getGlobal();
2940 const GlobalValue *GV = GSDN->getGlobal();
4492 const GlobalValue *GV = G->getGlobal();
4977 const GlobalValue *GV = nullptr;
11748 const GlobalValue *GV1 = nullptr;
11749 const GlobalValue *GV2 = nullptr;
lib/Target/PowerPC/PPCMCInstLower.cpp 55 const GlobalValue *GV = MO.getGlobal();
lib/Target/PowerPC/PPCSubtarget.cpp 177 bool PPCSubtarget::hasLazyResolverStub(const GlobalValue *GV) const {
232 bool PPCSubtarget::isGVIndirectSymbol(const GlobalValue *GV) const {
lib/Target/PowerPC/PPCSubtarget.h 231 bool hasLazyResolverStub(const GlobalValue *GV) const;
348 bool isGVIndirectSymbol(const GlobalValue *GV) const;
lib/Target/PowerPC/PPCTargetTransformInfo.cpp 238 const auto *GV = dyn_cast<GlobalValue>(MemAddr);
238 const auto *GV = dyn_cast<GlobalValue>(MemAddr);
lib/Target/RISCV/RISCVISelLowering.cpp 475 const GlobalValue *GV = N->getGlobal();
508 const GlobalValue *GV = N->getGlobal();
549 const GlobalValue *GV = N->getGlobal();
2061 const GlobalValue *GV = G->getGlobal();
2272 const GlobalValue *GV = S->getGlobal();
lib/Target/Sparc/SparcISelLowering.cpp 2023 const GlobalValue *GV = GA->getGlobal();
lib/Target/Sparc/SparcTargetObjectFile.cpp 24 const GlobalValue *GV, unsigned Encoding, const TargetMachine &TM,
lib/Target/Sparc/SparcTargetObjectFile.h 27 const MCExpr *getTTypeGlobalReference(const GlobalValue *GV,
lib/Target/SystemZ/SystemZConstantPoolValue.cpp 18 SystemZConstantPoolValue(const GlobalValue *gv,
23 SystemZConstantPoolValue::Create(const GlobalValue *GV,
lib/Target/SystemZ/SystemZConstantPoolValue.h 33 const GlobalValue *GV;
37 SystemZConstantPoolValue(const GlobalValue *GV,
42 Create(const GlobalValue *GV, SystemZCP::SystemZCPModifier Modifier);
51 const GlobalValue *getGlobalValue() const { return GV; }
lib/Target/SystemZ/SystemZISelLowering.cpp 2824 const GlobalValue *GV = Node->getGlobal();
2930 const GlobalValue *GV = Node->getGlobal();
lib/Target/SystemZ/SystemZSubtarget.cpp 69 bool SystemZSubtarget::isPC32DBLSymbol(const GlobalValue *GV,
lib/Target/SystemZ/SystemZSubtarget.h 244 bool isPC32DBLSymbol(const GlobalValue *GV, CodeModel::Model CM) const;
lib/Target/TargetLoweringObjectFile.cpp 117 const GlobalValue *GV, StringRef Suffix, const TargetMachine &TM) const {
128 const GlobalValue *GV, const TargetMachine &TM,
309 const GlobalValue *GV, unsigned Encoding, const TargetMachine &TM,
344 SmallVectorImpl<char> &OutName, const GlobalValue *GV,
lib/Target/TargetMachine.cpp 77 static TLSModel::Model getSelectedTLSModel(const GlobalValue *GV) {
95 const GlobalValue *GV) const {
211 TLSModel::Model TargetMachine::getTLSModel(const GlobalValue *GV) const {
248 const GlobalValue *GV, Mangler &Mang,
260 MCSymbol *TargetMachine::getSymbol(const GlobalValue *GV) const {
lib/Target/WebAssembly/WebAssemblyFastISel.cpp 63 const GlobalValue *GV = nullptr;
99 void setGlobalValue(const GlobalValue *G) { GV = G; }
100 const GlobalValue *getGlobalValue() const { return GV; }
231 if (const auto *GV = dyn_cast<GlobalValue>(Obj)) {
231 if (const auto *GV = dyn_cast<GlobalValue>(Obj)) {
402 if (const GlobalValue *GV = Addr.getGlobalValue())
616 if (const GlobalValue *GV = dyn_cast<GlobalValue>(C)) {
616 if (const GlobalValue *GV = dyn_cast<GlobalValue>(C)) {
lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp 142 GlobalValue::LocalExecTLSModel &&
lib/Target/WebAssembly/WebAssemblyISelLowering.cpp 1101 const GlobalValue *GV = GA->getGlobal();
lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp 360 FTy, GlobalValue::ExternalLinkage,
470 Function::Create(FTy, GlobalValue::ExternalLinkage, "__invoke_" + Sig, M);
643 GlobalValue::ExternalLinkage, "getTempRet0", &M);
646 GlobalValue::ExternalLinkage, "setTempRet0", &M);
657 ResumeF = Function::Create(ResumeFTy, GlobalValue::ExternalLinkage,
663 EHTypeIDF = Function::Create(EHTypeIDTy, GlobalValue::ExternalLinkage,
681 GlobalValue::ExternalLinkage,
696 Function::Create(FTy, GlobalValue::ExternalLinkage, "saveSetjmp", &M);
702 Function::Create(FTy, GlobalValue::ExternalLinkage, "testSetjmp", &M);
706 EmLongjmpF = Function::Create(FTy, GlobalValue::ExternalLinkage,
lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp 49 const GlobalValue *Global = MO.getGlobal();
lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp 267 GlobalValue::ThreadLocalMode::NotThreadLocal) {
269 GV.setThreadLocalMode(GlobalValue::ThreadLocalMode::NotThreadLocal);
lib/Target/X86/X86AsmPrinter.cpp 120 const GlobalValue *GV = MO.getGlobal();
lib/Target/X86/X86ExpandPseudo.cpp 87 const GlobalValue *CombinedGlobal = JTInst->getOperand(1).getGlobal();
lib/Target/X86/X86FastISel.cpp 150 unsigned X86MaterializeGV(const GlobalValue *GV, MVT VT);
718 if (const GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
718 if (const GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
1050 if (const GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
1050 if (const GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
3478 const GlobalValue *GV = nullptr;
3812 unsigned X86FastISel::X86MaterializeGV(const GlobalValue *GV, MVT VT) {
3859 else if (const GlobalValue *GV = dyn_cast<GlobalValue>(C))
3859 else if (const GlobalValue *GV = dyn_cast<GlobalValue>(C))
lib/Target/X86/X86ISelDAGToDAG.cpp 68 const GlobalValue *GV;
lib/Target/X86/X86ISelLowering.cpp17763 const GlobalValue *GV, const unsigned char OpFlags) const {
17862 const GlobalValue *GV = nullptr;
18089 const GlobalValue *GV = GA->getGlobal();
22717 GlobalValue::dropLLVMManglingEscape(Fn->getName()));
23555 GlobalValue::dropLLVMManglingEscape(Fn->getName()));
lib/Target/X86/X86ISelLowering.h 1325 unsigned getGlobalWrapperKind(const GlobalValue *GV = nullptr,
lib/Target/X86/X86InstrBuilder.h 56 const GlobalValue *GV;
lib/Target/X86/X86InstrInfo.cpp 3987 const GlobalValue *GV =
3988 cast<GlobalValue>((*MIB->memoperands_begin())->getValue());
lib/Target/X86/X86MCInstLower.cpp 145 const GlobalValue *GV = MO.getGlobal();
lib/Target/X86/X86RetpolineThunks.cpp 202 Function::Create(Type, GlobalValue::LinkOnceODRLinkage, Name, &M);
203 F->setVisibility(GlobalValue::HiddenVisibility);
lib/Target/X86/X86Subtarget.cpp 65 X86Subtarget::classifyGlobalReference(const GlobalValue *GV) const {
70 X86Subtarget::classifyLocalReference(const GlobalValue *GV) const {
122 unsigned char X86Subtarget::classifyGlobalReference(const GlobalValue *GV,
172 X86Subtarget::classifyGlobalFunctionReference(const GlobalValue *GV) const {
177 X86Subtarget::classifyGlobalFunctionReference(const GlobalValue *GV,
lib/Target/X86/X86Subtarget.h 844 unsigned char classifyLocalReference(const GlobalValue *GV) const;
846 unsigned char classifyGlobalReference(const GlobalValue *GV,
848 unsigned char classifyGlobalReference(const GlobalValue *GV) const;
851 unsigned char classifyGlobalFunctionReference(const GlobalValue *GV,
853 unsigned char classifyGlobalFunctionReference(const GlobalValue *GV) const;
lib/Target/X86/X86TargetObjectFile.cpp 26 const GlobalValue *GV, unsigned Encoding, const TargetMachine &TM,
44 const GlobalValue *GV, const TargetMachine &TM,
50 const GlobalValue *GV, const MCSymbol *Sym, const MCValue &MV,
lib/Target/X86/X86TargetObjectFile.h 21 const MCExpr *getTTypeGlobalReference(const GlobalValue *GV,
29 MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV,
33 const MCExpr *getIndirectSymViaGOTPCRel(const GlobalValue *GV,
lib/Target/X86/X86WinEHState.cpp 402 Function::Create(TrampolineTy, GlobalValue::InternalLinkage,
403 Twine("__ehhandler$") + GlobalValue::dropLLVMManglingEscape(
lib/Target/XCore/XCoreAsmPrinter.cpp 124 case GlobalValue::AppendingLinkage:
126 case GlobalValue::LinkOnceAnyLinkage:
127 case GlobalValue::LinkOnceODRLinkage:
128 case GlobalValue::WeakAnyLinkage:
129 case GlobalValue::WeakODRLinkage:
130 case GlobalValue::ExternalLinkage:
131 case GlobalValue::CommonLinkage:
139 case GlobalValue::InternalLinkage:
140 case GlobalValue::PrivateLinkage:
lib/Target/XCore/XCoreISelLowering.cpp 248 const GlobalValue *GV,
264 static bool IsSmallObject(const GlobalValue *GV, const XCoreTargetLowering &XTL) {
281 const GlobalValue *GV = GN->getGlobal();
426 const GlobalValue *GV;
lib/Target/XCore/XCoreISelLowering.h 161 SDValue getGlobalAddressWrapper(SDValue GA, const GlobalValue *GV,
lib/Transforms/Coroutines/CoroEarly.cpp 123 Function::Create(FnTy, GlobalValue::LinkageTypes::PrivateLinkage,
lib/Transforms/Coroutines/CoroSplit.cpp 400 Function::Create(FnTy, GlobalValue::LinkageTypes::InternalLinkage,
664 NewF->setLinkage(llvm::GlobalValue::ExternalLinkage);
1422 Function::Create(FnTy, GlobalValue::LinkageTypes::PrivateLinkage,
lib/Transforms/IPO/BlockExtractor.cpp 228 F.setLinkage(GlobalValue::ExternalLinkage);
lib/Transforms/IPO/ConstantMerge.cpp 46 SmallPtrSetImpl<const GlobalValue*> &UsedValues) {
52 GlobalValue *GV = cast<GlobalValue>(Operand);
52 GlobalValue *GV = cast<GlobalValue>(Operand);
95 const SmallPtrSetImpl<const GlobalValue *> &UsedGlobals) {
111 New->setUnnamedAddr(GlobalValue::UnnamedAddr::None);
136 SmallPtrSet<const GlobalValue*, 8> UsedGlobals;
lib/Transforms/IPO/ElimAvailExtern.cpp 46 GV.setLinkage(GlobalValue::ExternalLinkage);
lib/Transforms/IPO/ExtractGV.cpp 25 static void makeVisible(GlobalValue &GV, bool Delete) {
28 GV.setLinkage(GlobalValue::ExternalLinkage);
30 GV.setVisibility(GlobalValue::HiddenVisibility);
43 case GlobalValue::LinkOnceAnyLinkage:
44 GV.setLinkage(GlobalValue::WeakAnyLinkage);
46 case GlobalValue::LinkOnceODRLinkage:
47 GV.setLinkage(GlobalValue::WeakODRLinkage);
55 SetVector<GlobalValue *> Named;
63 explicit GVExtractorPass(std::vector<GlobalValue*> &GVs,
136 Declaration = Function::Create(FTy, GlobalValue::ExternalLinkage,
142 new GlobalVariable(M, Ty, false, GlobalValue::ExternalLinkage,
158 ModulePass *llvm::createGVExtractionPass(std::vector<GlobalValue *> &GVs,
lib/Transforms/IPO/FunctionImport.cpp 180 GlobalValue::GUID GUID) {
208 if (GlobalValue::isInterposableLinkage(GVSummary->linkage())) {
226 if (GlobalValue::isLocalLinkage(Summary->linkage()) &&
263 GlobalValue::GUID>;
302 return GlobalValue::isLocalLinkage(RefSummary->linkage()) &&
595 GlobalValue::GUID G) {
604 static GlobalValue::GUID getGUID(GlobalValue::GUID G) { return G; }
604 static GlobalValue::GUID getGUID(GlobalValue::GUID G) { return G; }
735 const DenseSet<GlobalValue::GUID> &GUIDPreservedSymbols,
736 function_ref<PrevailingType(GlobalValue::GUID)> isPrevailing) {
795 if (S->linkage() == GlobalValue::AvailableExternallyLinkage ||
796 S->linkage() == GlobalValue::WeakODRLinkage ||
797 S->linkage() == GlobalValue::LinkOnceODRLinkage)
799 else if (GlobalValue::isInterposableLinkage(S->linkage()))
851 const DenseSet<GlobalValue::GUID> &GUIDPreservedSymbols,
852 function_ref<PrevailingType(GlobalValue::GUID)> isPrevailing,
910 bool llvm::convertToDeclaration(GlobalValue &GV) {
919 V->setLinkage(GlobalValue::ExternalLinkage);
923 GlobalValue *NewGV;
927 GlobalValue::ExternalLinkage, GV.getAddressSpace(),
932 /*isConstant*/ false, GlobalValue::ExternalLinkage,
954 if (GlobalValue::isLocalLinkage(GV.getLinkage()) ||
958 GlobalValue::isLocalLinkage(NewLinkage) ||
968 if (GlobalValue::isAvailableExternallyLinkage(NewLinkage) &&
969 GlobalValue::isInterposableLinkage(GV.getLinkage())) {
980 if (NewLinkage == GlobalValue::WeakODRLinkage &&
983 GV.setVisibility(GlobalValue::HiddenVisibility);
1024 std::string OrigId = GlobalValue::getGlobalIdentifier(
1025 OrigName, GlobalValue::InternalLinkage,
1027 GS = DefinedGlobals.find(GlobalValue::getGUID(OrigId));
1035 GS = DefinedGlobals.find(GlobalValue::getGUID(OrigName));
1039 return !GlobalValue::isLocalLinkage(GS->second->linkage());
1069 GV.setLinkage(GlobalValue::InternalLinkage);
1070 GV.setVisibility(GlobalValue::DefaultVisibility);
1106 SetVector<GlobalValue *> GlobalsToImport;
1183 for (const auto *GV : GlobalsToImport)
1241 if (GlobalValue::isLocalLinkage(S->linkage()))
1242 S->setLinkage(GlobalValue::ExternalLinkage);
lib/Transforms/IPO/GlobalDCE.cpp 101 SmallPtrSetImpl<GlobalValue *> &Deps) {
105 } else if (auto *GV = dyn_cast<GlobalValue>(V)) {
105 } else if (auto *GV = dyn_cast<GlobalValue>(V)) {
114 SmallPtrSetImpl<GlobalValue *> &LocalDeps = ConstantDependenciesCache[CE];
122 void GlobalDCEPass::UpdateGVDependencies(GlobalValue &GV) {
123 SmallPtrSet<GlobalValue *, 8> Deps;
127 for (GlobalValue *GVU : Deps) {
142 void GlobalDCEPass::MarkLive(GlobalValue &GV,
143 SmallVectorImpl<GlobalValue *> *Updates) {
342 SmallVector<GlobalValue *, 8> NewLiveGVs{AliveGlobals.begin(),
345 GlobalValue *LGV = NewLiveGVs.pop_back_val();
346 for (auto *GVD : GVDependencies[LGV])
444 bool GlobalDCEPass::RemoveUnusedGlobalValue(GlobalValue &GV) {
lib/Transforms/IPO/GlobalOpt.cpp 166 isa<GlobalValue>(V))
419 static bool GlobalUsersSafeToSRA(GlobalValue *GV) {
853 *GV->getParent(), GlobalType, false, GlobalValue::InternalLinkage,
885 GlobalValue::InternalLinkage,
1304 *GV->getParent(), PFieldTy, false, GlobalValue::InternalLinkage,
1415 Type *ValTy = cast<GlobalValue>(FieldGlobals[i])->getValueType();
1630 GlobalValue::InternalLinkage,
1761 GlobalValue &GV, SmallPtrSetImpl<const Comdat *> &NotDiscardableComdats) {
1786 const Function *F, GlobalValue *GV,
2065 processGlobal(GlobalValue &GV,
2078 auto NewUnnamedAddr = GV.hasLocalLinkage() ? GlobalValue::UnnamedAddr::Global
2079 : GlobalValue::UnnamedAddr::Local;
2273 F->setLinkage(GlobalValue::InternalLinkage);
2362 GV->setLinkage(GlobalValue::InternalLinkage);
2600 const SmallPtrSetImpl<GlobalValue *> &Init) {
2610 for (GlobalValue *GV : Init) {
2622 new GlobalVariable(*M, ATy, false, GlobalValue::AppendingLinkage,
2633 SmallPtrSet<GlobalValue *, 8> Used;
2634 SmallPtrSet<GlobalValue *, 8> CompilerUsed;
2644 using iterator = SmallPtrSet<GlobalValue *, 8>::iterator;
2661 bool usedCount(GlobalValue *GV) const { return Used.count(GV); }
2663 bool compilerUsedCount(GlobalValue *GV) const {
2667 bool usedErase(GlobalValue *GV) { return Used.erase(GV); }
2668 bool compilerUsedErase(GlobalValue *GV) { return CompilerUsed.erase(GV); }
2669 bool usedInsert(GlobalValue *GV) { return Used.insert(GV).second; }
2671 bool compilerUsedInsert(GlobalValue *GV) {
2701 static bool hasMoreThanOneUseOtherThanLLVMUsed(GlobalValue &V,
2737 GlobalValue *Target = cast<GlobalValue>(Aliasee->stripPointerCasts());
2737 GlobalValue *Target = cast<GlobalValue>(Aliasee->stripPointerCasts());
2757 for (GlobalValue *GV : Used.used())
2766 J->setLinkage(GlobalValue::InternalLinkage);
2778 GlobalValue *Target = dyn_cast<GlobalValue>(Aliasee->stripPointerCasts());
2778 GlobalValue *Target = dyn_cast<GlobalValue>(Aliasee->stripPointerCasts());
lib/Transforms/IPO/GlobalSplit.cpp 80 GV.isConstant(), GlobalValue::PrivateLinkage,
lib/Transforms/IPO/Internalize.cpp 65 bool operator()(const GlobalValue &GV) {
88 bool InternalizePass::shouldPreserveGV(const GlobalValue &GV) {
113 GlobalValue &GV, const DenseSet<const Comdat *> &ExternalComdats) {
132 GV.setVisibility(GlobalValue::DefaultVisibility);
133 GV.setLinkage(GlobalValue::InternalLinkage);
140 GlobalValue &GV, DenseSet<const Comdat *> &ExternalComdats) {
153 SmallPtrSet<GlobalValue *, 8> Used;
176 for (GlobalValue *V : Used) {
250 std::function<bool(const GlobalValue &)> MustPreserveGV;
257 InternalizeLegacyPass(std::function<bool(const GlobalValue &)> MustPreserveGV)
288 std::function<bool(const GlobalValue &)> MustPreserveGV) {
lib/Transforms/IPO/LowerTypeTests.cpp 338 SmallPtrSet<GlobalValue *, 16> Used, CompilerUsed;
594 M, Int8Ty, /*isConstant=*/true, GlobalValue::PrivateLinkage, nullptr);
596 GlobalValue::PrivateLinkage, nullptr);
633 GlobalValue::PrivateLinkage, ByteArrayConst);
647 Int8Ty, 0, GlobalValue::PrivateLinkage, "bits", GEP, &M);
674 ByteArray = GlobalAlias::create(Int8Ty, 0, GlobalValue::PrivateLinkage,
860 GlobalValue::PrivateLinkage, NewInit);
909 GlobalAlias::create(Int8Ty, 0, GlobalValue::ExternalLinkage,
911 GA->setVisibility(GlobalValue::HiddenVisibility);
967 GV->setVisibility(GlobalValue::HiddenVisibility);
1049 GlobalValue::VisibilityTypes Visibility = F->getVisibility();
1057 GlobalValue::ExternalLinkage,
1070 FDecl = Function::Create(F->getFunctionType(), GlobalValue::ExternalLinkage,
1072 FDecl->setVisibility(GlobalValue::HiddenVisibility);
1075 F->setLinkage(GlobalValue::ExternalLinkage);
1076 FDecl = Function::Create(F->getFunctionType(), GlobalValue::ExternalLinkage,
1079 Visibility = GlobalValue::HiddenVisibility;
1087 F->getFunctionType(), GlobalValue::ExternalLinkage,
1254 GlobalValue::InternalLinkage,
1299 GlobalValue::ExternalWeakLinkage,
1491 GlobalValue::PrivateLinkage,
1521 F->getValueType(), 0, GlobalValue::ExternalLinkage,
1523 JtAlias->setVisibility(GlobalValue::HiddenVisibility);
1731 if (!isa<GlobalValue>(C)) {
1843 DenseSet<GlobalValue::GUID> AddressTaken;
1861 const GlobalValue::GUID GUID = GlobalValue::getGUID(
1861 const GlobalValue::GUID GUID = GlobalValue::getGUID(
1862 GlobalValue::dropLLVMManglingEscape(FunctionName));
1874 if (GVS->isLive() && !GlobalValue::isLocalLinkage(GVS->linkage()))
1913 F->setLinkage(GlobalValue::ExternalLinkage);
1922 F->setLinkage(GlobalValue::ExternalLinkage);
1930 F->setLinkage(GlobalValue::ExternalWeakLinkage);
2049 DenseMap<GlobalValue::GUID, TinyPtrVector<Metadata *>> MetadataByGUID;
2052 MetadataByGUID[GlobalValue::getGUID(TypeId->getString())].push_back(
2061 for (GlobalValue::GUID G : FS->type_tests())
2147 GlobalValue::VisibilityTypes Visibility =
2162 Alias->setLinkage(GlobalValue::WeakAnyLinkage);
lib/Transforms/IPO/MergeFunctions.cpp 775 GA->setUnnamedAddr(GlobalValue::UnnamedAddr::Global);
825 F->setLinkage(GlobalValue::PrivateLinkage);
lib/Transforms/IPO/SampleProfile.cpp 307 DenseSet<GlobalValue::GUID> &InlinedGUIDs);
901 Function &F, DenseSet<GlobalValue::GUID> &InlinedGUIDs) {
1611 DenseSet<GlobalValue::GUID> InlinedGUIDs;
lib/Transforms/IPO/StripSymbols.cpp 165 if (!isa<GlobalValue>(V) || cast<GlobalValue>(V)->hasLocalLinkage()) {
165 if (!isa<GlobalValue>(V) || cast<GlobalValue>(V)->hasLocalLinkage()) {
191 SmallPtrSetImpl<const GlobalValue*> &UsedValues) {
198 if (GlobalValue *GV =
199 dyn_cast<GlobalValue>(Inits->getOperand(i)->stripPointerCasts()))
206 SmallPtrSet<const GlobalValue*, 8> llvmUsedValues;
lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp 37 SetVector<GlobalValue *> &PromoteExtra) {
39 for (auto &ExportGV : ExportM.global_values()) {
44 GlobalValue *ImportGV = nullptr;
63 ExportGV.setLinkage(GlobalValue::ExternalLinkage);
64 ExportGV.setVisibility(GlobalValue::HiddenVisibility);
68 ImportGV->setVisibility(GlobalValue::HiddenVisibility);
157 Function::Create(EmptyFT, GlobalValue::ExternalLinkage,
176 function_ref<bool(const GlobalValue *)> ShouldKeepDefinition) {
177 std::vector<GlobalValue *> V;
178 for (GlobalValue &GV : M->global_values())
182 for (GlobalValue *GV : V)
190 if (isa<GlobalValue>(C))
293 F.setLinkage(GlobalValue::AvailableExternallyLinkage);
297 SetVector<GlobalValue *> CfiFunctions;
lib/Transforms/IPO/WholeProgramDevirt.cpp 585 std::set<GlobalValue::GUID> &ExportedGUIDs;
595 std::set<GlobalValue::GUID> &ExportedGUIDs,
705 ModuleSummaryIndex &Summary, std::set<GlobalValue::GUID> &ExportedGUIDs,
712 function_ref<bool(StringRef, GlobalValue::GUID)> isExported,
957 TheFn->setLinkage(GlobalValue::ExternalLinkage);
958 TheFn->setVisibility(GlobalValue::HiddenVisibility);
992 if (GlobalValue::isLocalLinkage(S->linkage()) && Size > 1)
1007 if (GlobalValue::isLocalLinkage(S->linkage())) {
1057 JT->setVisibility(GlobalValue::HiddenVisibility);
1242 GlobalAlias *GA = GlobalAlias::create(Int8Ty, 0, GlobalValue::ExternalLinkage,
1244 GA->setVisibility(GlobalValue::HiddenVisibility);
1265 GV->setVisibility(GlobalValue::HiddenVisibility);
1812 DenseMap<GlobalValue::GUID, TinyPtrVector<Metadata *>> MetadataByGUID;
1815 MetadataByGUID[GlobalValue::getGUID(TypeId->getString())].push_back(
1892 GlobalValue::getGUID(cast<MDString>(S.first.TypeID)->getString());
1934 DenseMap<GlobalValue::GUID, std::vector<StringRef>> NameByGUID;
1936 NameByGUID[GlobalValue::getGUID(P.first)].push_back(P.first);
lib/Transforms/Instrumentation/AddressSanitizer.cpp 794 void poisonOneInitializer(Function &GlobalInit, GlobalValue *ModuleName);
795 void createInitializerPoisonCalls(Module &M, GlobalValue *ModuleName);
1259 GlobalValue::PrivateLinkage, LocStruct,
1261 GV->setUnnamedAddr(GlobalValue::UnnamedAddr::Global);
1761 GlobalValue *ModuleName) {
1777 Module &M, GlobalValue *ModuleName) {
2006 G->setLinkage(GlobalValue::InternalLinkage);
2025 Twine("__asan_global_") + GlobalValue::dropLLVMManglingEscape(OriginalName));
2033 GlobalValue::InternalLinkage, kAsanModuleDtorName, &M);
2069 SmallVector<GlobalValue *, 16> MetadataGlobals(ExtendedGlobals.size());
2131 SmallVector<GlobalValue *, 16> LivenessGlobals(ExtendedGlobals.size());
2286 GlobalValue::LinkageTypes Linkage = G->getLinkage();
2287 if (G->isConstant() && Linkage == GlobalValue::PrivateLinkage)
2288 Linkage = GlobalValue::InternalLinkage;
2298 NewGlobal->setUnnamedAddr(GlobalValue::UnnamedAddr::None);
2334 GlobalValue *InstrumentedGlobal = NewGlobal;
2343 GlobalAlias::create(GlobalValue::PrivateLinkage, "", NewGlobal);
2385 SmallVector<GlobalValue *, 16> GlobalsToAddToUsedList;
2613 if (F.getLinkage() == GlobalValue::AvailableExternallyLinkage) return false;
lib/Transforms/Instrumentation/DataFlowSanitizer.cpp 163 static StringRef GetGlobalTypeString(const GlobalValue &G) {
367 void addGlobalNamePrefix(GlobalValue *GV);
369 GlobalValue::LinkageTypes NewFLink,
626 void DataFlowSanitizer::addGlobalNamePrefix(GlobalValue *GV) {
647 GlobalValue::LinkageTypes NewFLink,
686 F->setLinkage(GlobalValue::LinkOnceODRLinkage);
883 GlobalValue::LinkageTypes wrapperLinkage =
886 : GlobalValue::LinkOnceODRLinkage;
lib/Transforms/Instrumentation/GCOVProfiling.cpp 803 GlobalValue::InternalLinkage,
855 Function *F = Function::Create(FTy, GlobalValue::InternalLinkage,
857 F->setUnnamedAddr(GlobalValue::UnnamedAddr::Global);
858 F->setLinkage(GlobalValue::InternalLinkage);
945 WriteoutF = Function::Create(WriteoutFTy, GlobalValue::InternalLinkage,
947 WriteoutF->setUnnamedAddr(GlobalValue::UnnamedAddr::Global);
1034 GlobalValue::InternalLinkage,
1041 GlobalValue::UnnamedAddr::Global);
1044 GlobalValue::InternalLinkage,
1047 EmitArcsCallArgsArrayGV->setUnnamedAddr(GlobalValue::UnnamedAddr::Global);
1077 *M, FileInfoArrayTy, /*isConstant*/ true, GlobalValue::InternalLinkage,
1080 FileInfoArrayGV->setUnnamedAddr(GlobalValue::UnnamedAddr::Global);
1194 FlushF = Function::Create(FTy, GlobalValue::InternalLinkage,
1197 FlushF->setLinkage(GlobalValue::InternalLinkage);
1198 FlushF->setUnnamedAddr(GlobalValue::UnnamedAddr::Global);
lib/Transforms/Instrumentation/HWAddressSanitizer.cpp 293 GlobalValue *ThreadPtrGlobal = nullptr;
424 GlobalValue::ExternalLinkage, nullptr,
1262 GlobalValue::ExternalLinkage, Initializer,
1265 NewGV->setLinkage(GlobalValue::PrivateLinkage);
1279 NewGV->setUnnamedAddr(GlobalValue::UnnamedAddr::None);
1291 new GlobalVariable(M, DescriptorTy, true, GlobalValue::PrivateLinkage,
1354 Start->setVisibility(GlobalValue::HiddenVisibility);
1359 Stop->setVisibility(GlobalValue::HiddenVisibility);
1370 GlobalValue::PrivateLinkage, nullptr, kHwasanNoteName);
1469 bool IsLocal = P.first && (!isa<GlobalValue>(P.first) ||
1470 cast<GlobalValue>(P.first)->hasLocalLinkage());
1472 IsLocal ? GlobalValue::InternalLinkage
1473 : GlobalValue::LinkOnceODRLinkage,
1476 ThunkFn->setVisibility(GlobalValue::HiddenVisibility);
lib/Transforms/Instrumentation/InstrOrderFile.cpp 82 OrderFileBuffer = new GlobalVariable(M, BufferTy, false, GlobalValue::LinkOnceODRLinkage,
89 BufferIdx = new GlobalVariable(M, IdxTy, false, GlobalValue::LinkOnceODRLinkage,
93 BitMap = new GlobalVariable(M, MapTy, false, GlobalValue::PrivateLinkage,
lib/Transforms/Instrumentation/InstrProfiling.cpp 666 Name->setLinkage(GlobalValue::PrivateLinkage);
746 GlobalValue::LinkageTypes Linkage = NamePtr->getLinkage();
747 GlobalValue::VisibilityTypes Visibility = NamePtr->getVisibility();
749 Linkage = GlobalValue::InternalLinkage;
750 Visibility = GlobalValue::DefaultVisibility;
767 Linkage = GlobalValue::LinkOnceODRLinkage;
768 Visibility = GlobalValue::HiddenVisibility;
856 NamePtr->setLinkage(GlobalValue::PrivateLinkage);
903 *M, VNodesTy, false, GlobalValue::PrivateLinkage,
926 GlobalValue::PrivateLinkage, NamesVal,
950 auto *RegisterF = Function::Create(RegisterFTy, GlobalValue::InternalLinkage,
952 RegisterF->setUnnamedAddr(GlobalValue::UnnamedAddr::Global);
993 new GlobalVariable(*M, Int32Ty, false, GlobalValue::ExternalLinkage,
998 GlobalValue::LinkOnceODRLinkage,
1003 User->setVisibility(GlobalValue::HiddenVisibility);
1035 GlobalValue::InternalLinkage,
1037 F->setUnnamedAddr(GlobalValue::UnnamedAddr::Global);
lib/Transforms/Instrumentation/Instrumentation.cpp 68 GlobalValue::PrivateLinkage, StrConst, NamePrefix);
70 GV->setUnnamedAddr(GlobalValue::UnnamedAddr::Global);
lib/Transforms/Instrumentation/MemorySanitizer.cpp 686 GlobalValue::PrivateLinkage, StrConst, "");
950 M, IRB.getInt32Ty(), true, GlobalValue::WeakODRLinkage,
957 GlobalValue::WeakODRLinkage,
lib/Transforms/Instrumentation/PGOInstrumentation.cpp 527 std::unordered_multimap<Comdat *, GlobalValue *> &ComdatMembers;
568 std::unordered_multimap<Comdat *, GlobalValue *> &ComdatMembers,
649 std::unordered_multimap<Comdat *, GlobalValue *> &ComdatMembers) {
680 GlobalAlias::create(GlobalValue::WeakAnyLinkage, OrigName, &F);
690 F.setLinkage(GlobalValue::LinkOnceODRLinkage);
708 GlobalAlias::create(GlobalValue::WeakAnyLinkage, OrigGAName, GA);
805 std::unordered_multimap<Comdat *, GlobalValue *> &ComdatMembers,
956 std::unordered_multimap<Comdat *, GlobalValue *> &ComdatMembers,
1161 F.getLinkage() == GlobalValue::AvailableExternallyLinkage));
1447 std::unordered_multimap<Comdat *, GlobalValue *> &ComdatMembers) {
1468 std::unordered_multimap<Comdat *, GlobalValue *> ComdatMembers;
1560 std::unordered_multimap<Comdat *, GlobalValue *> ComdatMembers;
lib/Transforms/Instrumentation/SanitizerCoverage.cpp 247 SmallVector<GlobalValue *, 20> GlobalsToAppendToUsed;
248 SmallVector<GlobalValue *, 20> GlobalsToAppendToCompilerUsed;
308 SecStart->setVisibility(GlobalValue::HiddenVisibility);
312 SecEnd->setVisibility(GlobalValue::HiddenVisibility);
352 CtorFunc->setLinkage(GlobalValue::WeakODRLinkage);
438 GlobalValue::ThreadLocalMode::InitialExecTLSModel);
576 if (F.getLinkage() == GlobalValue::AvailableExternallyLinkage)
lib/Transforms/Scalar/GVN.cpp 2205 if (isa<Argument>(Op) || isa<Constant>(Op) || isa<GlobalValue>(Op))
lib/Transforms/Scalar/LoopIdiomRecognize.cpp 1023 GlobalValue::PrivateLinkage,
1025 GV->setUnnamedAddr(GlobalValue::UnnamedAddr::Global); // Ok to merge these.
lib/Transforms/Scalar/LoopStrengthReduce.cpp 325 GlobalValue *BaseGV = nullptr;
771 static GlobalValue *ExtractSymbol(const SCEV *&S, ScalarEvolution &SE) {
773 if (GlobalValue *GV = dyn_cast<GlobalValue>(U->getValue())) {
773 if (GlobalValue *GV = dyn_cast<GlobalValue>(U->getValue())) {
779 GlobalValue *Result = ExtractSymbol(NewOps.back(), SE);
785 GlobalValue *Result = ExtractSymbol(NewOps.front(), SE);
1211 GlobalValue *BaseGV, int64_t BaseOffset,
1630 GlobalValue *BaseGV, int64_t BaseOffset,
1685 GlobalValue *BaseGV, int64_t BaseOffset,
1722 MemAccessTy AccessTy, GlobalValue *BaseGV,
1797 GlobalValue *BaseGV, int64_t BaseOffset,
1828 GlobalValue *BaseGV = ExtractSymbol(S, SE);
3746 GlobalValue *GV = ExtractSymbol(G, SE);
4464 if (GlobalValue *GV = dyn_cast<GlobalValue>(U->getValue()))
4464 if (GlobalValue *GV = dyn_cast<GlobalValue>(U->getValue()))
lib/Transforms/Utils/CloneModule.cpp 48 function_ref<bool(const GlobalValue *)> ShouldCloneDefinition) {
91 GlobalValue *GV;
94 GlobalValue::ExternalLinkage,
98 *New, I->getValueType(), false, GlobalValue::ExternalLinkage,
126 GV->setLinkage(GlobalValue::ExternalLinkage);
150 F->setLinkage(GlobalValue::ExternalLinkage);
lib/Transforms/Utils/CodeExtractor.cpp 824 funcType, GlobalValue::InternalLinkage, oldFunction->getAddressSpace(),
lib/Transforms/Utils/Evaluator.cpp 66 if (auto *GV = dyn_cast<GlobalValue>(C))
66 if (auto *GV = dyn_cast<GlobalValue>(C))
473 Ty, false, GlobalValue::InternalLinkage, UndefValue::get(Ty),
474 AI->getName(), /*TLMode=*/GlobalValue::NotThreadLocal,
lib/Transforms/Utils/FunctionComparator.cpp 267 auto GlobalValueL = const_cast<GlobalValue *>(dyn_cast<GlobalValue>(L));
268 auto GlobalValueR = const_cast<GlobalValue *>(dyn_cast<GlobalValue>(R));
397 int FunctionComparator::cmpGlobalValues(GlobalValue *L, GlobalValue *R) const {
397 int FunctionComparator::cmpGlobalValues(GlobalValue *L, GlobalValue *R) const {
lib/Transforms/Utils/FunctionImportUtils.cpp 21 const GlobalValue *SGV, SetVector<GlobalValue *> *GlobalsToImport) {
21 const GlobalValue *SGV, SetVector<GlobalValue *> *GlobalsToImport) {
35 const GlobalValue *SGV) {
43 const GlobalValue *SGV) {
71 if (!GlobalValue::isLocalLinkage(Linkage)) {
82 const GlobalValue &GV) const {
94 std::string FunctionImportGlobalProcessing::getName(const GlobalValue *SGV,
108 GlobalValue::LinkageTypes
109 FunctionImportGlobalProcessing::getLinkage(const GlobalValue *SGV,
117 return GlobalValue::ExternalLinkage;
126 case GlobalValue::LinkOnceODRLinkage:
127 case GlobalValue::ExternalLinkage:
133 return GlobalValue::AvailableExternallyLinkage;
137 case GlobalValue::AvailableExternallyLinkage:
141 return GlobalValue::ExternalLinkage;
145 case GlobalValue::LinkOnceAnyLinkage:
146 case GlobalValue::WeakAnyLinkage:
156 case GlobalValue::WeakODRLinkage:
162 return GlobalValue::AvailableExternallyLinkage;
164 return GlobalValue::ExternalLinkage;
166 case GlobalValue::AppendingLinkage:
172 return GlobalValue::AppendingLinkage;
174 case GlobalValue::InternalLinkage:
175 case GlobalValue::PrivateLinkage:
180 return GlobalValue::AvailableExternallyLinkage;
182 return GlobalValue::ExternalLinkage;
188 case GlobalValue::ExternalWeakLinkage:
194 case GlobalValue::CommonLinkage:
203 void FunctionImportGlobalProcessing::processGlobalForThinLTO(GlobalValue &GV) {
228 GV.setDLLStorageClass(GlobalValue::DefaultStorageClass);
267 GV.setVisibility(GlobalValue::HiddenVisibility);
316 SetVector<GlobalValue *> *GlobalsToImport) {
lib/Transforms/Utils/GlobalStatus.cpp 46 if (isa<GlobalValue>(C))
lib/Transforms/Utils/ModuleUtils.cpp 60 GlobalValue::AppendingLinkage, NewInit, Array);
71 static void appendToUsedList(Module &M, StringRef Name, ArrayRef<GlobalValue *> Values) {
86 for (auto *V : Values) {
96 GV = new llvm::GlobalVariable(M, ATy, false, GlobalValue::AppendingLinkage,
101 void llvm::appendToUsed(Module &M, ArrayRef<GlobalValue *> Values) {
105 void llvm::appendToCompilerUsed(Module &M, ArrayRef<GlobalValue *> Values) {
130 GlobalValue::InternalLinkage, CtorName, &M);
lib/Transforms/Utils/SanitizerStats.cpp 29 GlobalValue::InternalLinkage, nullptr);
84 *M, makeModuleStatsTy(), false, GlobalValue::InternalLinkage,
95 GlobalValue::InternalLinkage, "", M);
lib/Transforms/Utils/SimplifyCFG.cpp 4612 !isa<ConstantPointerNull>(C) && !isa<GlobalValue>(C) &&
5085 Array->setUnnamedAddr(GlobalValue::UnnamedAddr::Global);
lib/Transforms/Utils/SplitModule.cpp 55 using ClusterMapType = EquivalenceClasses<const GlobalValue *>;
56 using ComdatMembersType = DenseMap<const Comdat *, const GlobalValue *>;
57 using ClusterIDMapType = DenseMap<const GlobalValue *, unsigned>;
62 const GlobalValue *GV, const User *U) {
66 const GlobalValue *F = I->getParent()->getParent();
70 GVtoClusterMap.unionSets(GV, cast<GlobalValue>(U));
78 const GlobalValue *GV, const Value *V) {
85 if (isa<Constant>(UU) && !isa<GlobalValue>(UU)) {
172 SmallPtrSet<const GlobalValue *, 32> Visited;
215 static void externalize(GlobalValue *GV) {
217 GV->setLinkage(GlobalValue::ExternalLinkage);
218 GV->setVisibility(GlobalValue::HiddenVisibility);
228 static bool isInPartition(const GlobalValue *GV, unsigned I, unsigned N) {
lib/Transforms/Utils/ValueMapper.cpp 111 DenseSet<GlobalValue *> AlreadyScheduled;
358 if (isa<GlobalValue>(V)) {
lib/Transforms/Vectorize/SLPVectorizer.cpp 203 if (!isa<Constant>(i) || isa<ConstantExpr>(i) || isa<GlobalValue>(i))
tools/bugpoint/CrashDebugger.cpp 168 I.setLinkage(GlobalValue::ExternalLinkage);
264 std::vector<GlobalValue *> ToRemove;
296 for (auto *F : ToRemove) {
962 GV.setLinkage(GlobalValue::ExternalLinkage);
tools/bugpoint/ExtractFunction.cpp 75 if (C && !isa<GlobalValue>(C) && !Done.count(C))
133 I->setLinkage(GlobalValue::ExternalLinkage);
179 static void eliminateAliases(GlobalValue *GV) {
290 GlobalValue::AppendingLinkage, M1Init, GlobalName);
301 GlobalValue::AppendingLinkage, M2Init, GlobalName);
311 I->setLinkage(GlobalValue::ExternalLinkage);
316 I->setLinkage(GlobalValue::ExternalLinkage);
tools/bugpoint/Miscompilation.cpp 798 GlobalValue::ExternalLinkage, "main", Test.get());
802 GlobalValue::ExternalLinkage,
847 GlobalValue::InternalLinkage, InitArray, F->getName() + "_name");
867 GlobalValue::InternalLinkage, NullPtr, F->getName() + ".fpcache");
872 Function::Create(FuncTy, GlobalValue::InternalLinkage,
tools/clang/include/clang/CodeGen/ConstantInitBuilder.h 81 llvm::GlobalValue::LinkageTypes linkage
82 = llvm::GlobalValue::InternalLinkage,
tools/clang/lib/CodeGen/Address.h 108 template <class U> inline U cast(CodeGen::Address addr) {
tools/clang/lib/CodeGen/BackendUtil.cpp 1371 StringMap<DenseMap<GlobalValue::GUID, GlobalValueSummary *>>
1601 SmallPtrSet<GlobalValue*, 4> UsedGlobals;
1604 for (auto *GV : UsedGlobals) {
1637 *M, ModuleConstant->getType(), true, llvm::GlobalValue::PrivateLinkage,
1660 llvm::GlobalValue::PrivateLinkage,
1682 *M, ATy, false, llvm::GlobalValue::AppendingLinkage,
tools/clang/lib/CodeGen/CGBlocks.cpp 204 if (llvm::GlobalValue *desc = CGM.getModule().getNamedValue(descName))
260 llvm::GlobalValue::LinkageTypes linkage;
262 linkage = llvm::GlobalValue::InternalLinkage;
267 linkage = llvm::GlobalValue::InternalLinkage;
269 linkage = llvm::GlobalValue::LinkOnceODRLinkage;
276 if (linkage == llvm::GlobalValue::LinkOnceODRLinkage) {
279 global->setVisibility(llvm::GlobalValue::HiddenVisibility);
280 global->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
1446 {}), llvm::GlobalValue::InternalLinkage, ".block_isa_init",
1456 /*isConstant*/true, llvm::GlobalValue::InternalLinkage,
1575 fnLLVMType, llvm::GlobalValue::InternalLinkage, name, &CGM.getModule());
1977 Fn->setVisibility(llvm::GlobalValue::HiddenVisibility);
1978 Fn->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
1999 if (llvm::GlobalValue *Func = CGM.getModule().getNamedValue(FuncName))
2020 llvm::Function::Create(LTy, llvm::GlobalValue::LinkOnceODRLinkage,
2194 if (llvm::GlobalValue *Func = CGM.getModule().getNamedValue(FuncName))
2213 llvm::Function::Create(LTy, llvm::GlobalValue::LinkOnceODRLinkage,
2465 llvm::Function::Create(LTy, llvm::GlobalValue::InternalLinkage,
2540 llvm::Function::Create(LTy, llvm::GlobalValue::InternalLinkage,
2948 auto *GV = cast<llvm::GlobalValue>(C->stripPointerCasts());
2948 auto *GV = cast<llvm::GlobalValue>(C->stripPointerCasts());
2967 GV->setDLLStorageClass(llvm::GlobalValue::DLLImportStorageClass);
2968 GV->setLinkage(llvm::GlobalValue::ExternalLinkage);
2970 GV->setDLLStorageClass(llvm::GlobalValue::DLLExportStorageClass);
2971 GV->setLinkage(llvm::GlobalValue::ExternalLinkage);
2977 GV->setLinkage(llvm::GlobalValue::ExternalWeakLinkage);
tools/clang/lib/CodeGen/CGBuiltin.cpp 1168 FuncTy, llvm::GlobalValue::LinkOnceODRLinkage, Name, &CGM.getModule());
1169 Fn->setVisibility(llvm::GlobalValue::HiddenVisibility);
10037 cast<llvm::GlobalValue>(CpuModel)->setDSOLocal(true);
10110 cast<llvm::GlobalValue>(CpuModel)->setDSOLocal(true);
10130 cast<llvm::GlobalValue>(CpuFeatures2)->setDSOLocal(true);
10150 cast<llvm::GlobalValue>(Func.getCallee())->setDSOLocal(true);
10151 cast<llvm::GlobalValue>(Func.getCallee())
10152 ->setDLLStorageClass(llvm::GlobalValue::DefaultStorageClass);
tools/clang/lib/CodeGen/CGCUDANV.cpp 93 GV->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::None);
107 FnTy, llvm::GlobalValue::InternalLinkage, "dummy", &TheModule);
400 getRegisterGlobalsFnTy(), llvm::GlobalValue::InternalLinkage,
530 llvm::GlobalValue::InternalLinkage,
563 /*isConstant=*/true, llvm::GlobalValue::ExternalLinkage, nullptr,
618 auto Linkage = CudaGpuBinary ? llvm::GlobalValue::InternalLinkage :
619 llvm::GlobalValue::LinkOnceAnyLinkage;
633 if (Linkage != llvm::GlobalValue::InternalLinkage)
634 GpuBinaryHandle->setVisibility(llvm::GlobalValue::HiddenVisibility);
670 TheModule, VoidPtrPtrTy, false, llvm::GlobalValue::InternalLinkage,
698 llvm::GlobalAlias::create(llvm::GlobalValue::ExternalLinkage,
764 llvm::GlobalValue::InternalLinkage,
tools/clang/lib/CodeGen/CGCXX.cpp 116 llvm::GlobalValue::LinkageTypes Linkage = getFunctionLinkage(AliasDecl);
122 llvm::GlobalValue::LinkageTypes TargetLinkage =
127 llvm::GlobalValue *Entry = GetGlobalValue(MangledName);
140 auto *Ref = cast<llvm::GlobalValue>(GetAddrOfGlobal(TargetDecl));
140 auto *Ref = cast<llvm::GlobalValue>(GetAddrOfGlobal(TargetDecl));
147 if (llvm::GlobalValue::isDiscardableIfUnused(Linkage) &&
148 !(TargetLinkage == llvm::GlobalValue::AvailableExternallyLinkage &&
164 if (llvm::GlobalValue::isWeakForLinker(Linkage) &&
179 if (llvm::GlobalValue::isWeakForLinker(TargetLinkage))
187 Alias->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
tools/clang/lib/CodeGen/CGCXXABI.cpp 283 void CGCXXABI::setCXXDestructorDLLStorage(llvm::GlobalValue *GV,
290 llvm::GlobalValue::LinkageTypes CGCXXABI::getCXXDestructorLinkage(
tools/clang/lib/CodeGen/CGCXXABI.h 317 virtual void setCXXDestructorDLLStorage(llvm::GlobalValue *GV,
321 virtual llvm::GlobalValue::LinkageTypes
tools/clang/lib/CodeGen/CGDebugInfo.cpp 946 CGM.getVTableLinkage(RD) == llvm::GlobalValue::ExternalLinkage)
2129 llvm::GlobalValue::AvailableExternallyLinkage &&
tools/clang/lib/CodeGen/CGDecl.cpp 178 llvm::GlobalValue::LinkageTypes Linkage =
219 const VarDecl &D, llvm::GlobalValue::LinkageTypes Linkage) {
378 llvm::GlobalValue::LinkageTypes Linkage) {
1115 getModule(), Ty, isConstant, llvm::GlobalValue::PrivateLinkage,
1116 Constant, Name, InsertBefore, llvm::GlobalValue::NotThreadLocal, AS);
1118 GV->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
1430 EmitStaticVarDecl(D, llvm::GlobalValue::InternalLinkage);
tools/clang/lib/CodeGen/CGDeclCXX.cpp 338 llvm::Function::Create(FTy, llvm::GlobalValue::InternalLinkage,
421 llvm::GlobalValue::PrivateLinkage, InitFunc, "__cxx_init_fn_ptr");
tools/clang/lib/CodeGen/CGException.cpp 1879 FnTy, llvm::GlobalValue::InternalLinkage, Name.str(), &CGM.getModule());
tools/clang/lib/CodeGen/CGExpr.cpp 391 llvm::GlobalValue::PrivateLinkage, Init, ".ref.tmp", nullptr,
392 llvm::GlobalValue::NotThreadLocal,
2503 case llvm::GlobalValue::ExternalLinkage:
2504 case llvm::GlobalValue::LinkOnceODRLinkage:
2505 case llvm::GlobalValue::WeakODRLinkage:
2506 case llvm::GlobalValue::InternalLinkage:
2507 case llvm::GlobalValue::PrivateLinkage:
2825 GV->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
3077 InfoPtr->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
3138 InfoPtr->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
3155 cast<llvm::GlobalValue>(SlowPathFn.getCallee()->stripPointerCasts()));
3168 llvm::GlobalValue::WeakAnyLinkage, "__cfi_check", M);
3202 llvm::GlobalValue::WeakODRLinkage, "__cfi_check_fail", &CGM.getModule());
3203 F->setVisibility(llvm::GlobalValue::HiddenVisibility);
tools/clang/lib/CodeGen/CGExprAgg.cpp 502 llvm::GlobalValue::PrivateLinkage, C, "constinit",
tools/clang/lib/CodeGen/CGExprConstant.cpp 905 llvm::GlobalValue::InternalLinkage,
1411 llvm::GlobalValue *ConstantEmitter::getCurrentAddrPrivate() {
1419 llvm::GlobalValue::PrivateLinkage,
1432 llvm::GlobalValue *placeholder) {
tools/clang/lib/CodeGen/CGNonTrivialStruct.cpp 456 llvm::Function::Create(FuncTy, llvm::GlobalValue::LinkOnceODRLinkage,
458 F->setVisibility(llvm::GlobalValue::HiddenVisibility);
tools/clang/lib/CodeGen/CGObjC.cpp 3535 llvm::Function::Create(LTy, llvm::GlobalValue::InternalLinkage,
3619 LTy, llvm::GlobalValue::InternalLinkage, "__copy_helper_atomic_property_",
3742 CFLinkCheckFunc->setLinkage(llvm::GlobalValue::LinkOnceAnyLinkage);
3743 CFLinkCheckFunc->setVisibility(llvm::GlobalValue::HiddenVisibility);
tools/clang/lib/CodeGen/CGObjCGNU.cpp 222 llvm::GlobalValue::LinkOnceODRLinkage, value, name);
225 GV->setVisibility(llvm::GlobalValue::HiddenVisibility);
1010 llvm::GlobalValue::ExternalLinkage, nullptr, Sym);
1012 cast<llvm::GlobalValue>(isa)->setDLLStorageClass(llvm::GlobalValue::DLLImportStorageClass);
1012 cast<llvm::GlobalValue>(isa)->setDLLStorageClass(llvm::GlobalValue::DLLImportStorageClass);
1063 /*isConstant=*/true, llvm::GlobalValue::PrivateLinkage, C, ".str");
1064 Buffer->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
1097 Align, false, isNamed ? llvm::GlobalValue::LinkOnceODRLinkage
1098 : llvm::GlobalValue::PrivateLinkage);
1102 ObjCStrGV->setVisibility(llvm::GlobalValue::HiddenVisibility);
1211 IdTy, false, llvm::GlobalValue::ExternalLinkage,
1219 Int8Ty, false, llvm::GlobalValue::ExternalWeakLinkage,
1239 auto Storage = llvm::GlobalValue::DefaultStorageClass;
1241 Storage = llvm::GlobalValue::DLLImportStorageClass;
1243 Storage = llvm::GlobalValue::DLLExportStorageClass;
1245 cast<llvm::GlobalValue>(ClassSymbol)->setDLLStorageClass(Storage);
1296 llvm::GlobalValue::ExternalLinkage, nullptr, Name);
1317 false, llvm::GlobalValue::LinkOnceODRLinkage,
1339 CGM.getPointerAlign(), false, llvm::GlobalValue::InternalLinkage);
1366 llvm::GlobalValue::ExternalLinkage, nullptr, SymName);
1407 CGM.getPointerAlign(), false, llvm::GlobalValue::ExternalLinkage);
1440 true, llvm::GlobalValue::LinkOnceODRLinkage, Init, TypesVarName);
1442 GV->setVisibility(llvm::GlobalValue::HiddenVisibility);
1467 CGM.getPointerAlign(), false, llvm::GlobalValue::LinkOnceODRLinkage);
1469 GV->setVisibility(llvm::GlobalValue::HiddenVisibility);
1494 llvm::GlobalValue::LinkOnceODRLinkage, ZeroInit, Prefix +
1496 Sym->setVisibility(llvm::GlobalValue::HiddenVisibility);
1507 llvm::GlobalValue::ExternalLinkage, nullptr, StringRef("__start_") +
1509 Start->setVisibility(llvm::GlobalValue::HiddenVisibility);
1512 llvm::GlobalValue::ExternalLinkage, nullptr, StringRef("__stop_") +
1514 Stop->setVisibility(llvm::GlobalValue::HiddenVisibility);
1523 llvm::GlobalValue::LinkOnceODRLinkage, ".objcv2_load_function",
1525 LoadFunction->setVisibility(llvm::GlobalValue::HiddenVisibility);
1542 CGM.getPointerAlign(), false, llvm::GlobalValue::LinkOnceODRLinkage);
1543 InitStruct->setVisibility(llvm::GlobalValue::HiddenVisibility);
1554 /*isConstant*/true, llvm::GlobalValue::LinkOnceAnyLinkage,
1573 InitVar->setVisibility(llvm::GlobalValue::HiddenVisibility);
1587 false, llvm::GlobalValue::LinkOnceODRLinkage);
1590 GV->setVisibility(llvm::GlobalValue::HiddenVisibility);
1638 {}), llvm::GlobalValue::InternalLinkage, ".objc_early_init",
1653 /*isConstant*/true, llvm::GlobalValue::InternalLinkage,
1680 llvm::GlobalValue::ExternalLinkage, nullptr, Name);
1766 llvm::GlobalValue::ExternalLinkage, nullptr, SuperClassName);
1768 auto Storage = llvm::GlobalValue::DefaultStorageClass;
1770 Storage = llvm::GlobalValue::DLLImportStorageClass;
1772 Storage = llvm::GlobalValue::DLLExportStorageClass;
1774 cast<llvm::GlobalValue>(SuperClass)->setDLLStorageClass(Storage);
1843 false, llvm::GlobalValue::ExternalLinkage,
1849 llvm::GlobalValue::HiddenVisibility :
1850 llvm::GlobalValue::DefaultVisibility;
1873 llvm::GlobalValue::PrivateLinkage);
1927 CGM.getPointerAlign(), false, llvm::GlobalValue::ExternalLinkage);
1936 cast<llvm::GlobalValue>(classStruct)->setDLLStorageClass(llvm::GlobalValue::DLLExportStorageClass);
1936 cast<llvm::GlobalValue>(classStruct)->setDLLStorageClass(llvm::GlobalValue::DLLExportStorageClass);
1937 cast<llvm::GlobalValue>(classRefSymbol)->setDLLStorageClass(llvm::GlobalValue::DLLExportStorageClass);
1937 cast<llvm::GlobalValue>(classRefSymbol)->setDLLStorageClass(llvm::GlobalValue::DLLExportStorageClass);
1973 classStruct->getType(), false, llvm::GlobalValue::ExternalLinkage,
2078 llvm::GlobalValue::ExternalLinkage,
2110 llvm::GlobalValue::ExternalLinkage,
2114 llvm::GlobalValue::WeakAnyLinkage, ClassSymbol, symbolRef);
2330 SelectorTy->getElementType(), 0, llvm::GlobalValue::PrivateLinkage,
2399 llvm::GlobalValue::ExternalLinkage,
2427 llvm::GlobalValue::ExternalLinkage,
2446 llvm::GlobalValue::LinkOnceODRLinkage);
2472 llvm::GlobalValue::ExternalWeakLinkage, nullptr, Sym);
2557 IdTy->getElementType(), 0, llvm::GlobalValue::InternalLinkage,
2564 IdTy->getElementType(), 0, llvm::GlobalValue::InternalLinkage,
2973 llvm::GlobalValue::ExternalLinkage);
3398 llvm::GlobalValue::ExternalLinkage,
3454 OffsetVar->setLinkage(llvm::GlobalValue::ExternalLinkage);
3457 false, llvm::GlobalValue::ExternalLinkage,
3560 offset->setLinkage(llvm::GlobalValue::ExternalLinkage);
3564 false, llvm::GlobalValue::ExternalLinkage, offsetValue, Name);
3574 CGM.setGVProperties(cast<llvm::GlobalValue>(MetaClassStruct),
3583 CGM.setGVProperties(cast<llvm::GlobalValue>(ClassStruct),
3797 llvm::GlobalValue::InternalLinkage, ".objc_load_function",
3817 llvm::GlobalValue::ExternalWeakLinkage, "class_registerAlias_np",
3870 llvm::GlobalValue::InternalLinkage,
4033 llvm::GlobalValue::ExternalLinkage, nullptr, Name);
4088 false, llvm::GlobalValue::LinkOnceAnyLinkage,
tools/clang/lib/CodeGen/CGObjCMac.cpp 896 SmallVector<llvm::GlobalValue*, 16> DefinedClasses;
902 SmallVector<llvm::GlobalValue*, 16> DefinedNonLazyClasses;
905 SmallVector<llvm::GlobalValue*, 16> DefinedCategories;
908 SmallVector<llvm::GlobalValue*, 16> DefinedStubCategories;
911 SmallVector<llvm::GlobalValue*, 16> DefinedNonLazyCategories;
1415 std::vector<llvm::GlobalValue*> DefinedMetaClasses;
1427 void AddModuleClassList(ArrayRef<llvm::GlobalValue *> Container,
1848 static llvm::GlobalValue::LinkageTypes
1852 return llvm::GlobalValue::InternalLinkage;
1853 return llvm::GlobalValue::PrivateLinkage;
2013 llvm::GlobalValue::LinkageTypes Linkage = llvm::GlobalValue::PrivateLinkage;
2013 llvm::GlobalValue::LinkageTypes Linkage = llvm::GlobalValue::PrivateLinkage;
2018 GV->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
3082 llvm::GlobalValue::PrivateLinkage);
3100 false, llvm::GlobalValue::PrivateLinkage,
3675 llvm::GlobalValue::PrivateLinkage);
3697 llvm::GlobalValue::PrivateLinkage, nullptr,
3711 llvm::GlobalValue::PrivateLinkage, nullptr,
3981 llvm::GlobalValue::InternalLinkage,
3994 llvm::GlobalValue::LinkageTypes LT =
4011 llvm::GlobalValue::LinkageTypes LT =
4061 llvm::GlobalValue::PrivateLinkage, Value, Label);
4064 GV->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
6051 ArrayRef<llvm::GlobalValue *> Container, StringRef SymbolName,
6072 llvm::GlobalValue::LinkageTypes LT =
6325 GV->setVisibility(llvm::GlobalValue::HiddenVisibility);
6352 static llvm::GlobalValue::DLLStorageClassTypes getStorage(CodeGenModule &CGM,
6364 return llvm::GlobalValue::DLLImportStorageClass;
6366 return llvm::GlobalValue::DLLExportStorageClass;
6368 return llvm::GlobalValue::DLLImportStorageClass;
6369 return llvm::GlobalValue::DefaultStorageClass;
6376 llvm::GlobalValue::ExternalLinkage, nullptr,
6386 llvm::GlobalValue::ExternalLinkage, nullptr,
6524 llvm::GlobalValue::WeakAnyLinkage, Init,
6528 PTGV->setVisibility(llvm::GlobalValue::HiddenVisibility);
6734 false, llvm::GlobalValue::ExternalLinkage,
6745 ->setDLLStorageClass(llvm::GlobalValue::DLLImportStorageClass);
6748 ->setDLLStorageClass(llvm::GlobalValue::DLLExportStorageClass);
6770 IvarOffsetGV->setVisibility(llvm::GlobalValue::HiddenVisibility);
6772 IvarOffsetGV->setVisibility(llvm::GlobalValue::DefaultVisibility);
6875 false, llvm::GlobalValue::ExternalLinkage,
6958 Entry->setLinkage(llvm::GlobalValue::WeakAnyLinkage);
6967 llvm::GlobalValue::WeakAnyLinkage);
6973 Entry->setVisibility(llvm::GlobalValue::HiddenVisibility);
6984 false, llvm::GlobalValue::WeakAnyLinkage, Entry,
6992 PTGV->setVisibility(llvm::GlobalValue::HiddenVisibility);
7188 llvm::GlobalValue::WeakAnyLinkage);
7189 messageRef->setVisibility(llvm::GlobalValue::HiddenVisibility);
7261 llvm::GlobalValue::LinkageTypes L =
7262 Weak ? llvm::GlobalValue::ExternalWeakLinkage
7263 : llvm::GlobalValue::ExternalLinkage;
7271 NewGV->setDLLStorageClass(llvm::GlobalValue::DLLImportStorageClass);
7637 llvm::GlobalValue::ExternalLinkage, nullptr,
7700 false, llvm::GlobalValue::ExternalLinkage,
7715 llvm::GlobalValue::ExternalLinkage, nullptr,
7730 llvm::GlobalValue::LinkageTypes L = IsForDefinition
7731 ? llvm::GlobalValue::ExternalLinkage
7732 : llvm::GlobalValue::WeakAnyLinkage;
7748 Entry->setVisibility(llvm::GlobalValue::HiddenVisibility);
tools/clang/lib/CodeGen/CGOpenCLRuntime.cpp 30 return CGF.EmitStaticVarDecl(D, llvm::GlobalValue::InternalLinkage);
tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp 832 llvm::GlobalValue::PrivateLinkage, Init, Name);
1269 llvm::GlobalValue *OrigAddr,
1276 llvm::GlobalValue *Addr = CGM.GetGlobalValue(NewMangledName);
1284 llvm::GlobalValue::LinkageTypes LT = CGM.getFunctionLinkage(OldGD);
1329 llvm::GlobalValue *Addr = CGM.GetGlobalValue(MangledName);
1366 auto *Fn = llvm::Function::Create(FnTy, llvm::GlobalValue::InternalLinkage,
1589 llvm::GlobalValue *DefaultOpenMPLocation =
1591 llvm::GlobalValue::PrivateLinkage);
1593 llvm::GlobalValue::UnnamedAddr::Global);
2697 GV->setLinkage(llvm::GlobalValue::WeakAnyLinkage);
2931 CGM.addUsedGlobal(cast<llvm::GlobalValue>(Ctor));
2935 llvm::GlobalValue::PrivateLinkage,
2970 CGM.addUsedGlobal(cast<llvm::GlobalValue>(Dtor));
2974 llvm::GlobalValue::PrivateLinkage,
3148 llvm::GlobalValue::CommonLinkage, llvm::Constant::getNullValue(Ty),
3150 llvm::GlobalValue::NotThreadLocal, AddressSpace);
3306 llvm::GlobalValue::InternalLinkage, Name,
3972 llvm::GlobalValue::LinkageTypes Linkage) {
4018 llvm::GlobalValue::LinkageTypes Linkage) {
4029 llvm::GlobalValue::InternalLinkage, StrPtrInit, StringName);
4030 Str->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
4040 Twine(EntryName).concat(Name), llvm::GlobalValue::WeakAnyLinkage);
4170 CE->getFlags(), llvm::GlobalValue::WeakAnyLinkage);
4516 TaskEntryTy, llvm::GlobalValue::InternalLinkage, Name, &CGM.getModule());
4619 llvm::Function::Create(DestructorFnTy, llvm::GlobalValue::InternalLinkage,
4713 TaskPrivatesMapTy, llvm::GlobalValue::InternalLinkage, Name,
4903 TaskDupTy, llvm::GlobalValue::InternalLinkage, Name, &CGM.getModule());
5576 llvm::GlobalValue::InternalLinkage, Name,
6012 auto *Fn = llvm::Function::Create(FnTy, llvm::GlobalValue::InternalLinkage,
6089 auto *Fn = llvm::Function::Create(FnTy, llvm::GlobalValue::InternalLinkage,
6159 auto *Fn = llvm::Function::Create(FnTy, llvm::GlobalValue::InternalLinkage,
6522 OutlinedFn->setLinkage(llvm::GlobalValue::WeakAnyLinkage);
6528 llvm::GlobalValue::WeakAnyLinkage,
8610 /*isConstant=*/true, llvm::GlobalValue::PrivateLinkage,
8612 SizesArrayGbl->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
8626 /*isConstant=*/true, llvm::GlobalValue::PrivateLinkage,
8628 MapTypesArrayGbl->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
8868 auto *Fn = llvm::Function::Create(FnTy, llvm::GlobalValue::InternalLinkage,
9651 llvm::GlobalValue::LinkageTypes Linkage;
9665 Linkage = llvm::GlobalValue::InternalLinkage;
9669 cast<llvm::GlobalValue>(Addr)->setLinkage(Linkage);
9671 CGM.addCompilerUsedGlobal(cast<llvm::GlobalValue>(Addr));
9698 llvm::GlobalValue::LinkageTypes Linkage;
9719 GVAddrRef->setLinkage(llvm::GlobalValue::InternalLinkage);
9742 Linkage = llvm::GlobalValue::WeakAnyLinkage;
11129 llvm::GlobalValue *Orig = CGM.GetGlobalValue(MangledName);
tools/clang/lib/CodeGen/CGOpenMPRuntime.h 226 llvm::GlobalValue::LinkageTypes Linkage);
302 llvm::GlobalValue *OrigAddr,
578 llvm::GlobalValue::LinkageTypes Linkage;
589 llvm::GlobalValue::LinkageTypes Linkage)
597 llvm::GlobalValue::LinkageTypes getLinkage() const { return Linkage; }
598 void setLinkage(llvm::GlobalValue::LinkageTypes LT) { Linkage = LT; }
614 llvm::GlobalValue::LinkageTypes Linkage);
tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp 705 CGM.getTypes().GetFunctionType(CGFI), llvm::GlobalValue::InternalLinkage,
1180 llvm::GlobalValue::InternalLinkage,
1183 llvm::GlobalValue::NotThreadLocal,
1310 llvm::GlobalValue::InternalLinkage,
1313 llvm::GlobalValue::NotThreadLocal,
1385 llvm::GlobalValue::WeakAnyLinkage,
1837 llvm::GlobalValue::LinkageTypes) {
1909 llvm::GlobalValue *OrigAddr,
2223 llvm::GlobalValue::InternalLinkage, nullptr,
2225 UseSharedMemory->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
2234 llvm::GlobalValue::CommonLinkage, nullptr);
2237 llvm::GlobalValue::InternalLinkage, nullptr,
2239 RecSize->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
2491 Fn->setLinkage(llvm::GlobalValue::InternalLinkage);
3191 llvm::GlobalValue::InternalLinkage,
3485 CGM.getTypes().GetFunctionType(CGFI), llvm::GlobalValue::InternalLinkage,
3646 CGM.getTypes().GetFunctionType(CGFI), llvm::GlobalValue::InternalLinkage,
3752 CGM.getTypes().GetFunctionType(CGFI), llvm::GlobalValue::InternalLinkage,
3846 CGM.getTypes().GetFunctionType(CGFI), llvm::GlobalValue::InternalLinkage,
3952 CGM.getTypes().GetFunctionType(CGFI), llvm::GlobalValue::InternalLinkage,
4365 llvm::GlobalValue::InternalLinkage, nullptr,
4562 CGM.getTypes().GetFunctionType(CGFI), llvm::GlobalValue::InternalLinkage,
4565 Fn->setLinkage(llvm::GlobalValue::InternalLinkage);
4754 llvm::GlobalValue::InternalLinkage,
4756 /*InsertBefore=*/nullptr, llvm::GlobalValue::NotThreadLocal,
4766 llvm::GlobalValue::InternalLinkage,
4768 /*InsertBefore=*/nullptr, llvm::GlobalValue::NotThreadLocal,
4779 llvm::GlobalValue::InternalLinkage,
5127 /*isConstant=*/false, llvm::GlobalValue::CommonLinkage,
5130 llvm::GlobalValue::NotThreadLocal,
5157 /*isConstant=*/false, llvm::GlobalValue::InternalLinkage,
5192 /*isConstant=*/false, llvm::GlobalValue::InternalLinkage,
tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.h 99 llvm::GlobalValue::LinkageTypes Linkage) override;
205 llvm::GlobalValue *OrigAddr,
tools/clang/lib/CodeGen/CGStmt.cpp 1059 SLocPtr->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
2417 llvm::Function::Create(FuncLLVMTy, llvm::GlobalValue::InternalLinkage,
tools/clang/lib/CodeGen/CGStmtOpenMP.cpp 473 llvm::Function::Create(FuncLLVMTy, llvm::GlobalValue::InternalLinkage,
tools/clang/lib/CodeGen/CGVTT.cpp 124 Name, ArrayType, llvm::GlobalValue::ExternalLinkage, Align);
125 GV->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
tools/clang/lib/CodeGen/CGVTables.cpp 50 ThunkFn->setDLLStorageClass(llvm::GlobalValue::DefaultStorageClass);
522 llvm::GlobalValue *OldThunkFn = ThunkFn;
684 f->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
795 VTable->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
878 llvm::GlobalValue::LinkOnceODRLinkage;
880 llvm::GlobalValue::WeakODRLinkage;
tools/clang/lib/CodeGen/CodeGenFunction.cpp 511 llvm::GlobalValue::PrivateLinkage, Addr);
tools/clang/lib/CodeGen/CodeGenFunction.h 2775 llvm::GlobalValue::LinkageTypes Linkage);
tools/clang/lib/CodeGen/CodeGenModule.cpp 233 llvm::GlobalValue *Entry = GetGlobalValue(MangledName);
260 void CodeGenModule::addGlobalValReplacement(llvm::GlobalValue *GV, llvm::Constant *C) {
266 llvm::GlobalValue *GV = I.first;
309 llvm::GlobalValue *Entry = GetGlobalValue(MangledName);
311 const llvm::GlobalValue *GV = getAliasedGlobal(*Alias);
329 llvm::GlobalValue *AliaseeGV;
331 AliaseeGV = cast<llvm::GlobalValue>(CE->getOperand(0));
333 AliaseeGV = cast<llvm::GlobalValue>(Aliasee);
362 llvm::GlobalValue *Entry = GetGlobalValue(MangledName);
756 void CodeGenModule::setGlobalVisibility(llvm::GlobalValue *GV,
762 GV->setVisibility(llvm::GlobalValue::DefaultVisibility);
776 llvm::GlobalValue *GV) {
854 void CodeGenModule::setDSOLocal(llvm::GlobalValue *GV) const {
858 void CodeGenModule::setDLLImportDLLExport(llvm::GlobalValue *GV,
869 void CodeGenModule::setDLLImportDLLExport(llvm::GlobalValue *GV,
879 void CodeGenModule::setGVProperties(llvm::GlobalValue *GV,
885 void CodeGenModule::setGVProperties(llvm::GlobalValue *GV,
891 void CodeGenModule::setGVPropertiesAux(llvm::GlobalValue *GV,
921 void CodeGenModule::setTLSMode(llvm::GlobalValue *GV, const VarDecl &D) const {
924 llvm::GlobalValue::ThreadLocalMode TLM;
1067 if (llvm::GlobalValue *Entry = GetGlobalValue(NonTargetName))
1126 llvm::GlobalValue *CodeGenModule::GetGlobalValue(StringRef Name) {
1179 llvm::GlobalValue::AppendingLinkage);
1188 llvm::GlobalValue::LinkageTypes
1203 return llvm::GlobalValue::InternalLinkage;
1638 void CodeGenModule::SetCommonAttributes(GlobalDecl GD, llvm::GlobalValue *GV) {
1643 GV->setVisibility(llvm::GlobalValue::DefaultVisibility);
1759 static void setLinkageForGV(llvm::GlobalValue *GV, const NamedDecl *ND) {
1767 GV->setLinkage(llvm::GlobalValue::ExternalWeakLinkage);
1851 F->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
1854 F->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
1885 void CodeGenModule::addUsedGlobal(llvm::GlobalValue *GV) {
1891 void CodeGenModule::addCompilerUsedGlobal(llvm::GlobalValue *GV) {
1917 CGM.getModule(), ATy, false, llvm::GlobalValue::AppendingLinkage,
2104 llvm::GlobalValue *GV = dyn_cast<llvm::GlobalValue>(
2104 llvm::GlobalValue *GV = dyn_cast<llvm::GlobalValue>(
2168 llvm::GlobalValue::AppendingLinkage,
2182 llvm::GlobalValue::PrivateLinkage, s, ".str");
2184 gv->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
2205 llvm::Constant *CodeGenModule::EmitAnnotateAttr(llvm::GlobalValue *GV,
2224 llvm::GlobalValue *GV) {
2376 /*isConstant=*/true, llvm::GlobalValue::LinkOnceODRLinkage, Init, Name);
2391 llvm::GlobalValue *Entry = GetGlobalValue(AA->getAliasee());
2408 auto *F = cast<llvm::GlobalValue>(Aliasee);
2408 auto *F = cast<llvm::GlobalValue>(Aliasee);
2733 llvm::GlobalValue *GV) {
2746 GlobalDecl OldGD, GlobalDecl NewGD, llvm::GlobalValue *GV) {
2757 GV = cast<llvm::GlobalValue>(GetOrCreateLLVMFunction(
2789 void CodeGenModule::EmitGlobalDefinition(GlobalDecl GD, llvm::GlobalValue *GV) {
2837 static void ReplaceUsesOfNonProtoTypeWithRealFunction(llvm::GlobalValue *Old,
3039 if (llvm::GlobalValue *ResolverGV = GetGlobalValue(ResolverName))
3068 SetCommonAttributes(FD, cast<llvm::GlobalValue>(Resolver));
3118 llvm::GlobalValue *Entry = GetGlobalValue(MangledName);
3128 Entry->setDLLStorageClass(llvm::GlobalValue::DefaultStorageClass);
3364 F->setDLLStorageClass(llvm::GlobalValue::DLLImportStorageClass);
3365 F->setLinkage(llvm::GlobalValue::ExternalLinkage);
3412 llvm::GlobalValue *Entry = GetGlobalValue(MangledName);
3421 Entry->setDLLStorageClass(llvm::GlobalValue::DefaultStorageClass);
3464 llvm::GlobalValue::ExternalLinkage, nullptr, MangledName, nullptr,
3567 GV->setLinkage(llvm::GlobalValue::AvailableExternallyLinkage);
3615 StringRef Name, llvm::Type *Ty, llvm::GlobalValue::LinkageTypes Linkage,
3689 setDSOLocal(cast<llvm::GlobalValue>(Ret->stripPointerCasts()));
3697 llvm::GlobalValue *GV = GetGlobalValue(MangledName);
3788 llvm::GlobalValue *GV) {
3974 cast<llvm::GlobalValue>(Entry)->eraseFromParent();
3983 llvm::GlobalValue::LinkageTypes Linkage =
3995 if (Linkage != llvm::GlobalValue::InternalLinkage &&
4005 Linkage = llvm::GlobalValue::InternalLinkage;
4024 Linkage = llvm::GlobalValue::InternalLinkage;
4056 Linkage = llvm::GlobalValue::InternalLinkage;
4175 llvm::GlobalValue::LinkageTypes CodeGenModule::getLLVMLinkageForDeclarator(
4194 return llvm::GlobalValue::AvailableExternallyLinkage;
4247 llvm::GlobalValue::LinkageTypes CodeGenModule::getLLVMLinkageVarDefinition(
4361 static void ReplaceUsesOfNonProtoTypeWithRealFunction(llvm::GlobalValue *Old,
4384 llvm::GlobalValue *GV) {
4398 GV = cast<llvm::GlobalValue>(GetAddrOfFunction(GD, Ty, /*ForVTable=*/false,
4448 llvm::GlobalValue *Entry = GetGlobalValue(MangledName);
4459 llvm::GlobalValue::LinkageTypes LT;
4528 llvm::GlobalValue *Entry = GetGlobalValue(MangledName);
4671 llvm::GlobalValue *GV = nullptr;
4673 if ((GV = dyn_cast<llvm::GlobalValue>(C))) {
4685 GV->setLinkage(llvm::GlobalValue::ExternalLinkage);
4687 GV->setLinkage(llvm::GlobalValue::ExternalLinkage);
4689 GV->setDLLStorageClass(llvm::GlobalValue::DLLImportStorageClass);
4691 GV->setDLLStorageClass(llvm::GlobalValue::DLLExportStorageClass);
4737 llvm::GlobalValue::PrivateLinkage, C, ".str");
4738 GV->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
4885 GenerateStringLiteral(llvm::Constant *C, llvm::GlobalValue::LinkageTypes LT,
4897 GV->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
4928 llvm::GlobalValue::LinkageTypes LT;
4937 LT = llvm::GlobalValue::LinkOnceODRLinkage;
4940 LT = llvm::GlobalValue::PrivateLinkage;
4993 auto GV = GenerateStringLiteral(C, llvm::GlobalValue::PrivateLinkage, *this,
5064 llvm::GlobalValue::LinkageTypes Linkage =
5563 llvm::GlobalValue *Addr) {
5585 llvm::GlobalValue *Val = I.second;
5611 llvm::GlobalValue *Addr = getModule().getNamedValue(I.second);
5639 } else if (auto *GV = dyn_cast<llvm::GlobalValue>(Addr)) {
5639 } else if (auto *GV = dyn_cast<llvm::GlobalValue>(Addr)) {
5676 llvm::GlobalValue *GV = GetGlobalValue(Val.second);
tools/clang/lib/CodeGen/CodeGenModule.h 333 llvm::SmallPtrSet<llvm::GlobalValue*, 10> WeakRefReferences;
362 llvm::SmallVector<std::pair<llvm::GlobalValue *, llvm::Constant *>, 8>
427 llvm::GlobalValue *> StaticExternCMap;
620 llvm::GlobalValue::LinkageTypes Linkage);
767 void setGlobalVisibility(llvm::GlobalValue *GV, const NamedDecl *D) const;
769 void setDSOLocal(llvm::GlobalValue *GV) const;
771 void setDLLImportDLLExport(llvm::GlobalValue *GV, GlobalDecl D) const;
772 void setDLLImportDLLExport(llvm::GlobalValue *GV, const NamedDecl *D) const;
775 void setGVProperties(llvm::GlobalValue *GV, GlobalDecl GD) const;
776 void setGVProperties(llvm::GlobalValue *GV, const NamedDecl *D) const;
778 void setGVPropertiesAux(llvm::GlobalValue *GV, const NamedDecl *D) const;
782 void setTLSMode(llvm::GlobalValue *GV, const VarDecl &D) const;
784 static llvm::GlobalValue::VisibilityTypes GetLLVMVisibility(Visibility V) {
786 case DefaultVisibility: return llvm::GlobalValue::DefaultVisibility;
787 case HiddenVisibility: return llvm::GlobalValue::HiddenVisibility;
788 case ProtectedVisibility: return llvm::GlobalValue::ProtectedVisibility;
803 llvm::GlobalValue::LinkageTypes Linkage,
1015 void MaybeHandleStaticInExternC(const SomeDecl *D, llvm::GlobalValue *GV);
1018 void addUsedGlobal(llvm::GlobalValue *GV);
1021 void addCompilerUsedGlobal(llvm::GlobalValue *GV);
1194 llvm::GlobalValue::LinkageTypes
1199 llvm::GlobalValue::LinkageTypes
1221 llvm::Constant *EmitAnnotateAttr(llvm::GlobalValue *GV,
1227 void AddGlobalAnnotations(const ValueDecl *D, llvm::GlobalValue *GV);
1256 llvm::GlobalValue *GetGlobalValue(StringRef Ref);
1262 void SetCommonAttributes(GlobalDecl GD, llvm::GlobalValue *GV);
1266 void addGlobalValReplacement(llvm::GlobalValue *GV, llvm::Constant *C);
1287 llvm::GlobalValue *GV);
1395 void EmitGlobalDefinition(GlobalDecl D, llvm::GlobalValue *GV = nullptr);
1397 void EmitGlobalFunctionDefinition(GlobalDecl GD, llvm::GlobalValue *GV);
1398 void EmitMultiVersionFunctionDefinition(GlobalDecl GD, llvm::GlobalValue *GV);
tools/clang/lib/CodeGen/CodeGenPGO.cpp 33 llvm::GlobalValue::LinkageTypes Linkage) {
849 llvm::GlobalValue::LinkageTypes Linkage) {
tools/clang/lib/CodeGen/CodeGenPGO.h 86 llvm::GlobalValue::LinkageTypes Linkage);
92 void setFuncName(StringRef Name, llvm::GlobalValue::LinkageTypes Linkage);
tools/clang/lib/CodeGen/ConstantEmitter.h 139 llvm::GlobalValue *getCurrentAddrPrivate();
151 llvm::GlobalValue *placeholder);
tools/clang/lib/CodeGen/ConstantInitBuilder.cpp 71 llvm::GlobalValue::LinkageTypes linkage,
80 llvm::GlobalValue::NotThreadLocal,
tools/clang/lib/CodeGen/CoverageMappingGen.cpp 1441 CGM.getModule(), CovDataTy, true, llvm::GlobalValue::InternalLinkage,
1457 llvm::GlobalValue::InternalLinkage, NamesArrVal,
tools/clang/lib/CodeGen/ItaniumCXXABI.cpp 282 Thunk->setLinkage(llvm::GlobalValue::AvailableExternallyLinkage);
399 llvm::GlobalValue::LinkageTypes Linkage) const;
423 auto *Entry = CGM.GetGlobalValue(Name);
1697 llvm::GlobalValue *VTable = getAddrOfVTable(VTableClass, CharUnits());
1765 Name, VTableType, llvm::GlobalValue::ExternalLinkage,
1767 VTable->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
2381 auto *GV = cast<llvm::GlobalValue>(handle->stripPointerCasts());
2381 auto *GV = cast<llvm::GlobalValue>(handle->stripPointerCasts());
2382 GV->setVisibility(llvm::GlobalValue::HiddenVisibility);
2488 static llvm::GlobalValue::LinkageTypes
2490 llvm::GlobalValue::LinkageTypes VarLinkage =
2494 if (llvm::GlobalValue::isLocalLinkage(VarLinkage))
2502 return llvm::GlobalValue::WeakODRLinkage;
2540 Wrapper->setVisibility(llvm::GlobalValue::HiddenVisibility);
2601 llvm::GlobalValue *GV = CGM.GetGlobalValue(CGM.getMangledName(VD));
2642 llvm::GlobalValue *Init = nullptr;
2851 llvm::GlobalValue::VisibilityTypes Visibility,
2852 llvm::GlobalValue::DLLStorageClassTypes DLLStorageClass);
2894 llvm::GlobalValue::ExternalLinkage, nullptr,
3260 CGM.setDSOLocal(cast<llvm::GlobalValue>(VTable->stripPointerCasts()));
3288 return llvm::GlobalValue::InternalLinkage;
3294 return llvm::GlobalValue::InternalLinkage;
3303 return llvm::GlobalValue::LinkOnceODRLinkage;
3308 return llvm::GlobalValue::WeakODRLinkage;
3312 return llvm::GlobalValue::ExternalLinkage;
3322 return llvm::GlobalValue::LinkOnceODRLinkage;
3355 llvm::GlobalValue::VisibilityTypes llvmVisibility;
3356 if (llvm::GlobalValue::isLocalLinkage(Linkage))
3358 llvmVisibility = llvm::GlobalValue::DefaultVisibility;
3361 llvmVisibility = llvm::GlobalValue::HiddenVisibility;
3365 llvm::GlobalValue::DLLStorageClassTypes DLLStorageClass =
3366 llvm::GlobalValue::DefaultStorageClass;
3370 DLLStorageClass = llvm::GlobalValue::DLLExportStorageClass;
3379 llvm::GlobalValue::VisibilityTypes Visibility,
3380 llvm::GlobalValue::DLLStorageClassTypes DLLStorageClass) {
3836 llvm::GlobalValue::DLLStorageClassTypes DLLStorageClass =
3838 ? llvm::GlobalValue::DLLExportStorageClass
3839 : llvm::GlobalValue::DefaultStorageClass;
3840 llvm::GlobalValue::VisibilityTypes Visibility =
3848 Type, llvm::GlobalValue::ExternalLinkage,
3856 QualType CanTy, llvm::GlobalValue::LinkageTypes Linkage) const {
3861 if (Linkage != llvm::GlobalValue::LinkOnceODRLinkage &&
3862 Linkage != llvm::GlobalValue::WeakODRLinkage)
3870 if (Linkage == llvm::GlobalValue::LinkOnceODRLinkage)
3901 llvm::GlobalValue::LinkageTypes Linkage = CGM.getFunctionLinkage(AliasDecl);
3903 if (llvm::GlobalValue::isDiscardableIfUnused(Linkage))
3910 if (llvm::GlobalValue::isWeakForLinker(Linkage)) {
3924 llvm::GlobalValue::LinkageTypes Linkage = CGM.getFunctionLinkage(AliasDecl);
3927 llvm::GlobalValue *Entry = CGM.GetGlobalValue(MangledName);
3931 auto *Aliasee = cast<llvm::GlobalValue>(CGM.GetAddrOfGlobal(TargetDecl));
3931 auto *Aliasee = cast<llvm::GlobalValue>(CGM.GetAddrOfGlobal(TargetDecl));
3937 Alias->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
tools/clang/lib/CodeGen/MicrosoftCXXABI.cpp 217 void setCXXDestructorDLLStorage(llvm::GlobalValue *GV,
221 llvm::GlobalValue::LinkageTypes
350 llvm::GlobalValue::LinkageTypes Linkage =
352 ? llvm::GlobalValue::LinkOnceODRLinkage
353 : llvm::GlobalValue::InternalLinkage;
369 Thunk->setLinkage(llvm::GlobalValue::InternalLinkage);
371 Thunk->setLinkage(llvm::GlobalValue::WeakODRLinkage);
373 Thunk->setLinkage(llvm::GlobalValue::LinkOnceODRLinkage);
528 llvm::GlobalValue::ExternalLinkage,
765 typedef llvm::DenseMap<VFTableIdTy, llvm::GlobalValue *> VFTablesMapTy;
1228 Fn->setLinkage(llvm::GlobalValue::WeakODRLinkage);
1292 void MicrosoftCXXABI::setCXXDestructorDLLStorage(llvm::GlobalValue *GV,
1298 GV->setDLLStorageClass(llvm::GlobalValue::DefaultStorageClass);
1305 llvm::GlobalValue::LinkageTypes MicrosoftCXXABI::getCXXDestructorLinkage(
1310 return llvm::GlobalValue::InternalLinkage;
1323 return llvm::GlobalValue::WeakODRLinkage;
1325 return llvm::GlobalValue::AvailableExternallyLinkage;
1326 return llvm::GlobalValue::LinkOnceODRLinkage;
1331 return llvm::GlobalValue::LinkOnceODRLinkage;
1775 llvm::GlobalValue::LinkageTypes VFTableLinkage =
1776 RD->hasAttr<DLLImportAttr>() ? llvm::GlobalValue::LinkOnceODRLinkage
1779 llvm::GlobalValue::isAvailableExternallyLinkage(VFTableLinkage) ||
1780 llvm::GlobalValue::isExternalLinkage(VFTableLinkage);
1784 if (llvm::GlobalValue *VFTable =
1796 llvm::GlobalValue::LinkageTypes VTableLinkage =
1797 VTableAliasIsRequred ? llvm::GlobalValue::PrivateLinkage : VFTableLinkage;
1805 llvm::GlobalValue *VFTable;
1809 VTable->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
1813 (llvm::GlobalValue::isWeakForLinker(VFTableLinkage) ||
1814 (llvm::GlobalValue::isLocalLinkage(VFTableLinkage) &&
1829 if (llvm::GlobalValue::isWeakForLinker(VFTableLinkage)) {
1830 VFTableLinkage = llvm::GlobalValue::ExternalLinkage;
1838 VFTable->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
1850 VFTable->setDLLStorageClass(llvm::GlobalValue::DLLExportStorageClass);
1977 if (llvm::GlobalValue *GV = CGM.getModule().getNamedValue(ThunkName))
1990 ? llvm::GlobalValue::LinkOnceODRLinkage
1991 : llvm::GlobalValue::InternalLinkage);
2005 ThunkFn->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::None);
2064 GV->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
2067 GV->setDLLStorageClass(llvm::GlobalValue::DLLImportStorageClass);
2069 GV->setDLLStorageClass(llvm::GlobalValue::DLLExportStorageClass);
2435 F->setLinkage(llvm::GlobalValue::LinkOnceODRLinkage);
3480 static llvm::GlobalValue::LinkageTypes getLinkageForRTTI(QualType Ty) {
3485 return llvm::GlobalValue::InternalLinkage;
3491 return llvm::GlobalValue::LinkOnceODRLinkage;
3894 if (llvm::GlobalValue *GV = CGM.getModule().getNamedValue(ThunkName))
4078 GV->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
4196 CTA->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
4265 GV->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
tools/clang/lib/CodeGen/TargetInfo.cpp 765 void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV,
1113 void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV,
1981 const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &CGM) const {
2352 void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV,
2390 void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV,
2406 static void addStackProbeTargetAttributes(const Decl *D, llvm::GlobalValue *GV,
2419 const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &CGM) const {
2432 void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV,
2463 const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &CGM) const {
5053 void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV,
5084 void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV,
5099 const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &CGM) const {
5707 void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV,
5751 void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV,
5766 const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &CGM) const {
6357 void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV,
6463 const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const {
6900 void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV,
6907 const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const {
6965 void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV,
7346 void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV,
7376 void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV,
7381 const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const {
7893 void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV,
7920 llvm::GlobalValue *GV) {
7921 if (GV->getVisibility() != llvm::GlobalValue::HiddenVisibility)
7932 llvm::GlobalValue *GV) {
7933 if (GV->getVisibility() != llvm::GlobalValue::HiddenVisibility)
7940 const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const {
7942 GV->setVisibility(llvm::GlobalValue::DefaultVisibility);
7945 GV->setVisibility(llvm::GlobalValue::ProtectedVisibility);
8703 void emitTargetMD(const Decl *D, llvm::GlobalValue *GV,
8868 void XCoreTargetCodeGenInfo::emitTargetMD(const Decl *D, llvm::GlobalValue *GV,
9670 void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV,
9898 auto *F = llvm::Function::Create(FT, llvm::GlobalValue::InternalLinkage, Name,
9956 auto *F = llvm::Function::Create(FT, llvm::GlobalValue::InternalLinkage, Name,
tools/clang/lib/CodeGen/TargetInfo.h 58 virtual void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV,
63 virtual void emitTargetMD(const Decl *D, llvm::GlobalValue *GV,
tools/clang/tools/clang-offload-wrapper/ClangOffloadWrapper.cpp 177 M, getEntryTy(), /*isConstant*/ true, GlobalValue::ExternalLinkage,
179 EntriesB->setVisibility(GlobalValue::HiddenVisibility);
181 M, getEntryTy(), /*isConstant*/ true, GlobalValue::ExternalLinkage,
183 EntriesE->setVisibility(GlobalValue::HiddenVisibility);
196 DummyEntry->setVisibility(GlobalValue::HiddenVisibility);
209 Image->setUnnamedAddr(GlobalValue::UnnamedAddr::Global);
229 GlobalValue::InternalLinkage, ImagesData,
231 Images->setUnnamedAddr(GlobalValue::UnnamedAddr::Global);
243 GlobalValue::InternalLinkage, DescInit,
249 auto *Func = Function::Create(FuncTy, GlobalValue::InternalLinkage,
270 auto *Func = Function::Create(FuncTy, GlobalValue::InternalLinkage,
tools/gold/gold-plugin.cpp 580 GlobalValue::VisibilityTypes Vis = Sym.getVisibility();
581 if (Vis != GlobalValue::DefaultVisibility)
584 case GlobalValue::DefaultVisibility:
586 case GlobalValue::HiddenVisibility:
589 case GlobalValue::ProtectedVisibility:
tools/lld/ELF/InputFiles.cpp 1387 static uint8_t mapVisibility(GlobalValue::VisibilityTypes gvVisibility) {
1389 case GlobalValue::DefaultVisibility:
1391 case GlobalValue::HiddenVisibility:
1393 case GlobalValue::ProtectedVisibility:
tools/lld/wasm/InputFiles.cpp 505 static uint8_t mapVisibility(GlobalValue::VisibilityTypes gvVisibility) {
507 case GlobalValue::DefaultVisibility:
509 case GlobalValue::HiddenVisibility:
510 case GlobalValue::ProtectedVisibility:
tools/lldb/source/Expression/IRExecutionUnit.cpp 363 std::function<void(llvm::GlobalValue &)> RegisterOneValue = [this](
tools/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp 111 llvm_function.setLinkage(GlobalValue::ExternalLinkage);
116 clang::NamedDecl *IRForTarget::DeclForGlobal(const GlobalValue *global_val,
136 if (mdconst::dyn_extract_or_null<GlobalValue>(
154 clang::NamedDecl *IRForTarget::DeclForGlobal(GlobalValue *global_val) {
346 GlobalValue::ExternalLinkage, nullptr, /* no initializer */
1107 GlobalValue::ExternalLinkage, nullptr, /* no initializer */
1202 if (!GlobalValue::isExternalLinkage(global_variable->getLinkage()))
1647 if (!isa<GlobalValue>(old_constant)) {
tools/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h 196 static clang::NamedDecl *DeclForGlobal(const llvm::GlobalValue *global_val,
200 clang::NamedDecl *DeclForGlobal(llvm::GlobalValue *global);
tools/lli/lli.cpp 322 GlobalValue::ExternalLinkage, "__main", M.get());
tools/llvm-diff/DiffConsumer.cpp 49 out << (isa<GlobalValue>(V) ? '@' : '%') << V->getName();
tools/llvm-diff/DifferenceEngine.cpp 390 if (isa<GlobalValue>(L))
391 return Engine.equivalentAsOperands(cast<GlobalValue>(L),
392 cast<GlobalValue>(R));
733 bool DifferenceEngine::equivalentAsOperands(GlobalValue *L, GlobalValue *R) {
733 bool DifferenceEngine::equivalentAsOperands(GlobalValue *L, GlobalValue *R) {
tools/llvm-diff/DifferenceEngine.h 81 bool equivalentAsOperands(GlobalValue *L, GlobalValue *R);
81 bool equivalentAsOperands(GlobalValue *L, GlobalValue *R);
tools/llvm-exegesis/lib/Assembler.cpp 82 FunctionType, GlobalValue::InternalLinkage, FunctionID, Module);
tools/llvm-extract/llvm-extract.cpp 151 SetVector<GlobalValue *> GVs;
189 GlobalValue *GV = M->getNamedGlobal(ExtractGlobals[i]);
222 GlobalValue *GV = M->getFunction(ExtractFuncs[i]);
292 for (GlobalValue *GV : GVs) {
326 SmallPtrSet<GlobalValue *, 8> GVSet(GVs.begin(), GVs.end());
334 std::vector<GlobalValue *> Gvs(GVs.begin(), GVs.end());
tools/llvm-link/llvm-link.cpp 310 if (GlobalValue::isLocalLinkage(S->linkage()))
311 S->setLinkage(GlobalValue::ExternalLinkage);
tools/llvm-lto2/llvm-lto2.cpp 388 case GlobalValue::HiddenVisibility:
391 case GlobalValue::ProtectedVisibility:
394 case GlobalValue::DefaultVisibility:
tools/llvm-stress/llvm-stress.cpp 169 auto *Func = Function::Create(FuncTy, GlobalValue::ExternalLinkage, Name, M);
tools/polly/include/polly/CodeGen/LoopGeneratorsKMP.h 38 GlobalValue *SourceLocationInfo;
tools/polly/lib/CodeGen/IslNodeBuilder.cpp 331 Values.remove_if([](const Value *V) { return isa<GlobalValue>(V); });
tools/polly/lib/CodeGen/LoopGeneratorsGOMP.cpp 30 GlobalValue::LinkageTypes Linkage = Function::ExternalLinkage;
180 GlobalValue::LinkageTypes Linkage = Function::ExternalLinkage;
200 GlobalValue::LinkageTypes Linkage = Function::ExternalLinkage;
216 GlobalValue::LinkageTypes Linkage = Function::ExternalLinkage;
tools/polly/lib/CodeGen/LoopGeneratorsKMP.cpp 40 GlobalValue::LinkageTypes Linkage = Function::ExternalLinkage;
280 GlobalValue::LinkageTypes Linkage = Function::ExternalLinkage;
299 GlobalValue::LinkageTypes Linkage = Function::ExternalLinkage;
324 GlobalValue::LinkageTypes Linkage = Function::ExternalLinkage;
363 GlobalValue::LinkageTypes Linkage = Function::ExternalLinkage;
385 GlobalValue::LinkageTypes Linkage = Function::ExternalLinkage;
425 GlobalValue::LinkageTypes Linkage = Function::ExternalLinkage;
470 *M, ArrayType, true, GlobalValue::PrivateLinkage, 0, ".str.ident");
474 *M, IdentTy, true, GlobalValue::PrivateLinkage, nullptr, LocName);
tools/polly/lib/CodeGen/PerfMonitor.cpp 26 GlobalValue::LinkageTypes Linkage = Function::ExternalLinkage;
55 GV = new GlobalVariable(*M, Ty, true, GlobalValue::AppendingLinkage,
78 *M, InitialValue->getType(), true, GlobalValue::WeakAnyLinkage,
125 GlobalValue::LinkageTypes Linkage = Function::WeakODRLinkage;
216 GlobalValue::LinkageTypes Linkage = Function::WeakODRLinkage;
tools/polly/lib/CodeGen/RuntimeDebugBuilder.cpp 26 GlobalValue::LinkageTypes Linkage = Function::ExternalLinkage;
47 GlobalValue::LinkageTypes Linkage = Function::ExternalLinkage;
250 GlobalValue::LinkageTypes Linkage = Function::ExternalLinkage;
275 GlobalValue::LinkageTypes Linkage = Function::ExternalLinkage;
tools/verify-uselistorder/verify-uselistorder.cpp 228 if ((isa<Constant>(Op) && !isa<GlobalValue>(*Op)) ||
239 if (!isa<GlobalValue>(C))
389 if (!isa<GlobalValue>(C))
431 if (!isa<GlobalValue>(C))
504 if ((isa<Constant>(Op) && !isa<GlobalValue>(*Op)) ||
unittests/Analysis/BasicAliasAnalysisTest.cpp 73 GlobalValue::ExternalLinkage, "F", &M);
85 GlobalPtr->setLinkage(GlobalValue::LinkageTypes::InternalLinkage);
107 GlobalValue::ExternalLinkage, "F", &M);
unittests/Analysis/MemoryBuiltinsTest.cpp 30 GlobalValue::ExternalLinkage, "F", &M);
unittests/Analysis/MemorySSATest.cpp 77 GlobalValue::ExternalLinkage, "F", &M);
115 GlobalValue::ExternalLinkage, "F", &M);
205 GlobalValue::ExternalLinkage, "F", &M);
249 GlobalValue::ExternalLinkage, "F", &M);
299 GlobalValue::ExternalLinkage, "F", &M);
335 GlobalValue::ExternalLinkage, "F", &M);
381 GlobalValue::ExternalLinkage, "F", &M);
425 GlobalValue::ExternalLinkage, "F", &M);
480 GlobalValue::ExternalLinkage, "F", &M);
525 GlobalValue::ExternalLinkage, "F", &M);
598 GlobalValue::ExternalLinkage, "F", &M);
629 GlobalValue::ExternalLinkage, "F", &M);
659 GlobalValue::ExternalLinkage, "F", &M);
703 GlobalValue::ExternalLinkage, "F", &M);
767 GlobalValue::ExternalLinkage, "F", &M);
796 GlobalValue::ExternalLinkage, "F", &M);
827 GlobalValue::ExternalLinkage, "F", &M);
886 GlobalValue::ExternalLinkage, "F", &M);
925 GlobalValue::ExternalLinkage, "F", &M);
970 GlobalValue::ExternalLinkage, "F", &M);
1005 GlobalValue::ExternalLinkage, "F", &M);
1048 GlobalValue::ExternalLinkage, "F", &M);
1099 GlobalValue::ExternalLinkage, "F", &M);
1141 GlobalValue::ExternalLinkage, "F", &M);
1222 GlobalValue::ExternalLinkage, "F", &M);
1271 GlobalValue::ExternalLinkage, "F", &M);
1336 GlobalValue::ExternalLinkage, "F", &M);
1413 GlobalValue::ExternalLinkage, "F", &M);
1469 GlobalValue::ExternalLinkage, "F", &M);
1541 GlobalValue::ExternalLinkage, "F", &M);
unittests/Analysis/ScalarEvolutionTest.cpp 77 Value *V0 = new GlobalVariable(M, Ty, false, GlobalValue::ExternalLinkage, Init, "V0");
78 Value *V1 = new GlobalVariable(M, Ty, false, GlobalValue::ExternalLinkage, Init, "V1");
79 Value *V2 = new GlobalVariable(M, Ty, false, GlobalValue::ExternalLinkage, Init, "V2");
unittests/Analysis/SparsePropagation.cpp 258 GlobalValue::InternalLinkage, "f", &M);
260 GlobalValue::InternalLinkage, "g", &M);
294 GlobalValue::InternalLinkage, "f", &M);
296 GlobalValue::InternalLinkage, "g", &M);
299 GlobalValue::InternalLinkage, nullptr, "gv");
335 GlobalValue::InternalLinkage, "f", &M);
337 GlobalValue::InternalLinkage, "g", &M);
340 GlobalValue::InternalLinkage, nullptr, "gv");
378 GlobalValue::InternalLinkage, "f", &M);
418 GlobalValue::InternalLinkage, "f", &M);
460 GlobalValue::InternalLinkage, "f", &M);
464 GlobalValue::InternalLinkage, "g", &M);
513 GlobalValue::InternalLinkage, "p", &M);
515 GlobalValue::InternalLinkage, "g", &M);
517 GlobalValue::InternalLinkage, "f", &M);
unittests/CodeGen/MachineInstrTest.cpp 157 auto F = Function::Create(Type, GlobalValue::ExternalLinkage, "Test", &M);
unittests/CodeGen/MachineOperandTest.cpp 245 GlobalValue *GV = M.getNamedValue("foo");
unittests/ExecutionEngine/ExecutionEngineTest.cpp 42 GlobalValue::ExternalLinkage, nullptr, Name);
unittests/ExecutionEngine/MCJIT/MCJITMultipleModuleTest.cpp 220 GVC->setLinkage(GlobalValue::InternalLinkage);
unittests/ExecutionEngine/MCJIT/MCJITTest.cpp 50 GlobalValue *Global = insertGlobalInt32(M.get(), "test_global", initialValue);
unittests/ExecutionEngine/MCJIT/MCJITTestBase.h 49 Function::Create(FT, GlobalValue::ExternalLinkage, Name, M);
114 Function::Create(FTy, GlobalValue::ExternalLinkage, Name, M);
121 GlobalValue::ExternalLinkage,
136 GlobalValue::ExternalLinkage,
unittests/ExecutionEngine/Orc/LegacyRTDyldObjectLinkingLayerTest.cpp 82 new GlobalVariable(*M, Int32Ty, false, GlobalValue::ExternalLinkage,
unittests/ExecutionEngine/Orc/OrcTestCommon.h 171 return Function::Create(FTy, GlobalValue::ExternalLinkage, Name, M.get());
unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp 78 new GlobalVariable(*M, Int32Ty, false, GlobalValue::ExternalLinkage,
120 Foo->setVisibility(GlobalValue::HiddenVisibility);
188 GlobalValue::ExternalLinkage, "bar", &M);
unittests/FuzzMutate/OperationsTest.cpp 180 GlobalValue::ExternalLinkage, "f", &M);
250 GlobalValue::ExternalLinkage, "f", &M);
288 GlobalValue::ExternalLinkage, "f", &M);
unittests/IR/ConstantsTest.cpp 335 GlobalValue::ExternalLinkage, nullptr);
342 new GlobalVariable(*M, ArrayTy, false, GlobalValue::ExternalLinkage, A0G);
355 GlobalValue::ExternalLinkage, nullptr);
357 GlobalValue::ExternalLinkage, nullptr);
365 new GlobalVariable(*M, IntTy, false, GlobalValue::ExternalLinkage, Int1);
380 *M, IntTy, false, GlobalValue::ExternalWeakLinkage, nullptr);
385 new GlobalVariable(*M, PtrTy, false, GlobalValue::ExternalLinkage, GEP);
389 GlobalValue::ExternalLinkage, nullptr);
390 auto *Alias = GlobalAlias::create(IntTy, 0, GlobalValue::ExternalLinkage,
472 GlobalValue::ExternalLinkage, nullptr);
484 FuncType, GlobalValue::ExternalLinkage, "", TheModule));
575 new GlobalVariable(IntType, true, GlobalValue::ExternalLinkage));
unittests/IR/FunctionTest.cpp 24 Function::Create(FTy, GlobalValue::ExternalLinkage, "F"));
52 Function::Create(FTy, GlobalValue::ExternalLinkage, "F1"));
54 Function::Create(FTy, GlobalValue::ExternalLinkage, "F1"));
127 llvm::GlobalValue::ExternalLinkage, "F", &M);
145 FuncType, GlobalValue::ExternalLinkage));
unittests/IR/IRBuilderTest.cpp 35 GlobalValue::ExternalLinkage, nullptr);
178 true, GlobalValue::ExternalLinkage, nullptr);
589 GlobalValue::ExternalLinkage, nullptr);
unittests/IR/LegacyPassManagerTest.cpp 491 /*Linkage=*/GlobalValue::ExternalLinkage,
499 /*Linkage=*/GlobalValue::ExternalLinkage,
507 /*Linkage=*/GlobalValue::ExternalLinkage,
515 /*Linkage=*/GlobalValue::ExternalLinkage,
unittests/IR/ManglerTest.cpp 28 GlobalValue::LinkageTypes Linkage,
unittests/IR/MetadataTest.cpp 349 auto *F0 = Function::Create(FTy, GlobalValue::ExternalLinkage, "F0", &M);
350 auto *F1 = Function::Create(FTy, GlobalValue::ExternalLinkage, "F1", &M);
374 GlobalValue::ExternalLinkage, "llvm.intrinsic", &M);
377 auto *F0 = Function::Create(FTy, GlobalValue::ExternalLinkage, "F0", &M);
378 auto *F1 = Function::Create(FTy, GlobalValue::ExternalLinkage, "F1", &M);
408 auto *F0 = Function::Create(FTy, GlobalValue::ExternalLinkage, "F0", &M);
409 auto *F1 = Function::Create(FTy, GlobalValue::ExternalLinkage, "F1", &M);
492 new GlobalVariable(Ty, false, GlobalValue::ExternalLinkage));
731 new GlobalVariable(Ty, false, GlobalValue::ExternalLinkage));
754 new GlobalVariable(Ty, false, GlobalValue::ExternalLinkage));
767 new GlobalVariable(Ty, false, GlobalValue::ExternalLinkage));
2531 new GlobalVariable(Ty, false, GlobalValue::ExternalLinkage));
2537 new GlobalVariable(Ty, false, GlobalValue::ExternalLinkage));
2592 new GlobalVariable(Ty, false, GlobalValue::ExternalLinkage));
2598 new GlobalVariable(Ty, false, GlobalValue::ExternalLinkage));
2609 new GlobalVariable(Ty, false, GlobalValue::ExternalLinkage));
unittests/IR/ModuleTest.cpp 34 GlobalValue::LinkageTypes L = GlobalValue::ExternalLinkage;
34 GlobalValue::LinkageTypes L = GlobalValue::ExternalLinkage;
unittests/IR/UserTest.cpp 125 RetVoidTy, GlobalValue::ExternalLinkage, "PersonalityFn", &M);
127 Function::Create(RetVoidTy, GlobalValue::ExternalLinkage, "TestFn", &M);
unittests/IR/ValueTest.cpp 56 GlobalValue::ExternalLinkage,
78 GlobalValue::ExternalLinkage,
99 new GlobalVariable(*M, Int32Ty, true, GlobalValue::ExternalLinkage,
unittests/IR/VerifierTest.cpp 127 GlobalValue::LinkOnceODRLinkage, nullptr, "Some Global");
141 Function::Create(FTy, GlobalValue::LinkOnceODRLinkage, "foo", &M);
174 GlobalValue::ExternalLinkage, nullptr, "g");
unittests/IR/WaymarkTest.cpp 30 Function::Create(FT, GlobalValue::ExternalLinkage));
unittests/Linker/LinkModulesTest.cpp 43 GlobalValue::InternalLinkage, nullptr,"switch.bas");
165 GlobalValue::InternalLinkage, nullptr, "g");
unittests/Transforms/Utils/CloningTest.cpp 462 OldFunc = Function::Create(FuncType, GlobalValue::PrivateLinkage, "f", M);
726 *OldM, Type::getInt32Ty(C), false, GlobalValue::ExternalLinkage,
735 auto *PersFn = Function::Create(FuncType, GlobalValue::ExternalLinkage,
738 Function::Create(FuncType, GlobalValue::PrivateLinkage, "f", OldM);
unittests/Transforms/Utils/FunctionComparatorTest.cpp 30 GlobalValue::ExternalLinkage, "F", &M);
76 int testCmpGlobalValues(GlobalValue *L, GlobalValue *R) {
76 int testCmpGlobalValues(GlobalValue *L, GlobalValue *R) {
unittests/Transforms/Utils/IntegerDivisionTest.cpp 30 GlobalValue::ExternalLinkage, "F", &M);
60 GlobalValue::ExternalLinkage, "F", &M);
90 GlobalValue::ExternalLinkage, "F", &M);
120 GlobalValue::ExternalLinkage, "F", &M);
151 GlobalValue::ExternalLinkage, "F", &M);
181 GlobalValue::ExternalLinkage, "F", &M);
211 GlobalValue::ExternalLinkage, "F", &M);
241 GlobalValue::ExternalLinkage, "F", &M);
unittests/Transforms/Utils/LocalTest.cpp 74 GlobalValue::ExternalLinkage, "F"));
143 auto *GV = M->getNamedValue("f");
519 auto *GV = M->getNamedValue("f");
unittests/Transforms/Utils/SSAUpdaterBulkTest.cpp 28 GlobalValue::ExternalLinkage, "F", &M);
115 GlobalValue::ExternalLinkage, "F", &M);
unittests/Transforms/Utils/ValueMapperTest.cpp 70 PtrTy, false, GlobalValue::ExternalLinkage, nullptr, "G0");
72 PtrTy, false, GlobalValue::ExternalLinkage, nullptr, "G1");
177 Function::Create(FTy, GlobalValue::ExternalLinkage, "F"));
236 Function::Create(FTy, GlobalValue::ExternalLinkage, "F"));
255 Function::Create(FTy, GlobalValue::ExternalLinkage, "F2"));
271 Function::Create(FTy, GlobalValue::ExternalLinkage, "F"));
290 Function::Create(FTy, GlobalValue::ExternalLinkage, "F"));
332 Function::Create(FTy, GlobalValue::ExternalLinkage, "F"));
usr/include/c++/7.4.0/bits/move.h 72 constexpr _Tp&&
83 constexpr _Tp&&
usr/include/c++/7.4.0/bits/std_function.h 299 _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args)
314 _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args)
628 using _Invoker_type = _Res (*)(const _Any_data&, _ArgTypes&&...);
usr/include/c++/7.4.0/bits/stl_iterator_base_types.h 123 typedef _Tp value_type;
usr/include/c++/7.4.0/type_traits 381 : public __is_pointer_helper<typename remove_cv<_Tp>::type>::type
1554 { typedef _Tp type; };
1558 { typedef _Tp type; };
1563 { typedef _Tp type; };
1574 remove_const<typename remove_volatile<_Tp>::type>::type type;
1633 { typedef _Tp type; };
1659 { typedef _Tp&& type; };
1983 { typedef _Up type; };