reference, declaration → definition definition → references, declarations, derived classes, virtual overrides reference to multiple definitions → definitions unreferenced |
621 if (GV.hasInitializer()) { 622 Assert(GV.getInitializer()->getType() == GV.getValueType(), 622 Assert(GV.getInitializer()->getType() == GV.getValueType(), 625 &GV); 628 if (GV.hasCommonLinkage()) { 629 Assert(GV.getInitializer()->isNullValue(), 630 "'common' global must have a zero initializer!", &GV); 631 Assert(!GV.isConstant(), "'common' global may not be marked constant!", 632 &GV); 633 Assert(!GV.hasComdat(), "'common' global may not be in a Comdat!", &GV); 633 Assert(!GV.hasComdat(), "'common' global may not be in a Comdat!", &GV); 637 if (GV.hasName() && (GV.getName() == "llvm.global_ctors" || 637 if (GV.hasName() && (GV.getName() == "llvm.global_ctors" || 638 GV.getName() == "llvm.global_dtors")) { 639 Assert(!GV.hasInitializer() || GV.hasAppendingLinkage(), 639 Assert(!GV.hasInitializer() || GV.hasAppendingLinkage(), 640 "invalid linkage for intrinsic global variable", &GV); 643 if (ArrayType *ATy = dyn_cast<ArrayType>(GV.getValueType())) { 652 "wrong type for intrinsic global variable", &GV); 659 "wrong type for intrinsic global variable", &GV); 663 if (GV.hasName() && (GV.getName() == "llvm.used" || 663 if (GV.hasName() && (GV.getName() == "llvm.used" || 664 GV.getName() == "llvm.compiler.used")) { 665 Assert(!GV.hasInitializer() || GV.hasAppendingLinkage(), 665 Assert(!GV.hasInitializer() || GV.hasAppendingLinkage(), 666 "invalid linkage for intrinsic global variable", &GV); 667 Type *GVType = GV.getValueType(); 670 Assert(PTy, "wrong type for intrinsic global variable", &GV); 671 if (GV.hasInitializer()) { 672 const Constant *Init = GV.getInitializer(); 689 GV.getMetadata(LLVMContext::MD_dbg, MDs); 702 if (auto *VTy = dyn_cast<VectorType>(GV.getValueType())) 703 Assert(!VTy->isScalable(), "Globals cannot contain scalable vectors", &GV); 705 if (!GV.hasInitializer()) { 706 visitGlobalValue(GV); 711 visitConstantExprsRecursively(GV.getInitializer()); 713 visitGlobalValue(GV);