reference, declaration → definition definition → references, declarations, derived classes, virtual overrides reference to multiple definitions → definitions unreferenced |
3620 if (GV) { 3622 if (GV->getType()->getElementType() == Ty) 3623 return GV; 3627 assert(GV->isDeclaration() && "Declaration has wrong type!"); 3628 OldGV = GV; 3632 GV = new llvm::GlobalVariable(getModule(), Ty, /*isConstant=*/true, 3637 GV->takeName(OldGV); 3641 llvm::ConstantExpr::getBitCast(GV, OldGV->getType()); 3648 if (supportsCOMDAT() && GV->isWeakForLinker() && 3649 !GV->hasAvailableExternallyLinkage()) 3650 GV->setComdat(TheModule.getOrInsertComdat(GV->getName())); 3650 GV->setComdat(TheModule.getOrInsertComdat(GV->getName())); 3652 GV->setAlignment(llvm::MaybeAlign(Alignment)); 3654 return GV;