reference, declaration → definition definition → references, declarations, derived classes, virtual overrides reference to multiple definitions → definitions unreferenced |
3956 if (!GV || GV->getType()->getElementType() != InitType || 3956 if (!GV || GV->getType()->getElementType() != InitType || 3957 GV->getType()->getAddressSpace() != 3964 GV = cast<llvm::GlobalVariable>( 3970 llvm::ConstantExpr::getBitCast(GV, Entry->getType()); 3977 MaybeHandleStaticInExternC(D, GV); 3980 AddGlobalAnnotations(D, GV); 3984 getLLVMLinkageVarDefinition(D, GV->isConstant()); 3993 if (GV && LangOpts.CUDA) { 3997 GV->setExternallyInitialized(true); 4017 getCUDARuntime().registerDeviceVar(D, *GV, Flags); 4029 GV->setInitializer(Init); 4030 if (emitter) emitter->finalize(GV); 4033 GV->setConstant(!NeedsGlobalCtor && !NeedsGlobalDtor && 4040 GV->setConstant(true); 4043 GV->setAlignment(getContext().getDeclAlign(D).getAsAlign()); 4058 GV->setLinkage(Linkage); 4060 GV->setDLLStorageClass(llvm::GlobalVariable::DLLImportStorageClass); 4062 GV->setDLLStorageClass(llvm::GlobalVariable::DLLExportStorageClass); 4064 GV->setDLLStorageClass(llvm::GlobalVariable::DefaultStorageClass); 4068 GV->setConstant(false); 4073 if (!GV->getInitializer()->isNullValue()) 4074 GV->setLinkage(llvm::GlobalVariable::WeakAnyLinkage); 4077 setNonAliasAttributes(D, GV); 4079 if (D->getTLSKind() && !GV->isThreadLocal()) { 4082 setTLSMode(GV, *D); 4085 maybeSetTrivialComdat(*D, *GV); 4089 EmitCXXGlobalVarDeclInitFunc(D, GV, NeedsGlobalCtor); 4091 SanitizerMD->reportGlobalToASan(GV, *D, NeedsGlobalCtor); 4096 DI->EmitGlobalVariable(GV, D);