Lines Matching refs:GD

283   for (const GlobalDecl &GD : Aliases) {  in checkAliases()  local
284 const auto *D = cast<ValueDecl>(GD.getDecl()); in checkAliases()
291 StringRef MangledName = getMangledName(GD); in checkAliases()
345 for (const GlobalDecl &GD : Aliases) { in checkAliases() local
346 StringRef MangledName = getMangledName(GD); in checkAliases()
642 StringRef CodeGenModule::getMangledName(GlobalDecl GD) { in getMangledName() argument
643 GlobalDecl CanonicalGD = GD.getCanonicalDecl(); in getMangledName()
649 CXXCtorType OrigCtorType = GD.getCtorType(); in getMangledName()
660 const auto *ND = cast<NamedDecl>(GD.getDecl()); in getMangledName()
666 getCXXABI().getMangleContext().mangleCXXCtor(D, GD.getCtorType(), Out); in getMangledName()
668 getCXXABI().getMangleContext().mangleCXXDtor(D, GD.getDtorType(), Out); in getMangledName()
679 auto Result = Manglings.insert(std::make_pair(Str, GD)); in getMangledName()
683 StringRef CodeGenModule::getBlockMangledName(GlobalDecl GD, in getBlockMangledName() argument
686 const Decl *D = GD.getDecl(); in getBlockMangledName()
694 MangleCtx.mangleCtorBlock(CD, GD.getCtorType(), BD, Out); in getBlockMangledName()
696 MangleCtx.mangleDtorBlock(DD, GD.getDtorType(), BD, Out); in getBlockMangledName()
754 CodeGenModule::getFunctionLinkage(GlobalDecl GD) { in getFunctionLinkage() argument
755 const auto *D = cast<FunctionDecl>(GD.getDecl()); in getFunctionLinkage()
761 GD.getDtorType())) { in getFunctionLinkage()
780 void CodeGenModule::setFunctionDLLStorageClass(GlobalDecl GD, llvm::Function *F) { in setFunctionDLLStorageClass() argument
781 const auto *FD = cast<FunctionDecl>(GD.getDecl()); in setFunctionDLLStorageClass()
784 if (getCXXABI().useThunkForDtorVariant(Dtor, GD.getDtorType())) { in setFunctionDLLStorageClass()
1031 void CodeGenModule::SetFunctionAttributes(GlobalDecl GD, llvm::Function *F, in SetFunctionAttributes() argument
1041 const auto *FD = cast<FunctionDecl>(GD.getDecl()); in SetFunctionAttributes()
1044 SetLLVMFunctionAttributes(FD, getTypes().arrangeGlobalDeclaration(GD), F); in SetFunctionAttributes()
1049 if (!IsThunk && getCXXABI().HasThisReturn(GD) && in SetFunctionAttributes()
1277 GlobalDecl D = G.GD; in EmitDeferred()
1523 void CodeGenModule::EmitGlobal(GlobalDecl GD) { in EmitGlobal() argument
1524 const auto *Global = cast<ValueDecl>(GD.getDecl()); in EmitGlobal()
1533 return EmitAliasDefinition(GD); in EmitGlobal()
1537 return emitIFuncDefinition(GD); in EmitGlobal()
1566 if (OpenMPRuntime && OpenMPRuntime->emitTargetGlobal(GD)) in EmitGlobal()
1582 StringRef MangledName = getMangledName(GD); in EmitGlobal()
1585 const CGFunctionInfo &FI = getTypes().arrangeGlobalDeclaration(GD); in EmitGlobal()
1588 GetOrCreateLLVMFunction(MangledName, Ty, GD, /*ForVTable=*/false, in EmitGlobal()
1619 EmitGlobalDefinition(GD); in EmitGlobal()
1631 StringRef MangledName = getMangledName(GD); in EmitGlobal()
1634 addDeferredDeclToEmit(GV, GD); in EmitGlobal()
1638 addDeferredDeclToEmit(/*GV=*/nullptr, GD); in EmitGlobal()
1643 DeferredDecls[MangledName] = GD; in EmitGlobal()
1732 CodeGenModule::shouldEmitFunction(GlobalDecl GD) { in shouldEmitFunction() argument
1733 if (getFunctionLinkage(GD) != llvm::Function::AvailableExternallyLinkage) in shouldEmitFunction()
1735 const auto *F = cast<FunctionDecl>(GD.getDecl()); in shouldEmitFunction()
1771 void CodeGenModule::EmitGlobalDefinition(GlobalDecl GD, llvm::GlobalValue *GV) { in EmitGlobalDefinition() argument
1772 const auto *D = cast<ValueDecl>(GD.getDecl()); in EmitGlobalDefinition()
1781 if (!shouldEmitFunction(GD)) in EmitGlobalDefinition()
1789 ABI->emitCXXStructor(CD, getFromCtorType(GD.getCtorType())); in EmitGlobalDefinition()
1791 ABI->emitCXXStructor(DD, getFromDtorType(GD.getDtorType())); in EmitGlobalDefinition()
1793 EmitGlobalFunctionDefinition(GD, GV); in EmitGlobalDefinition()
1796 getVTables().EmitThunks(GD); in EmitGlobalDefinition()
1801 return EmitGlobalFunctionDefinition(GD, GV); in EmitGlobalDefinition()
1823 GlobalDecl GD, bool ForVTable, in GetOrCreateLLVMFunction() argument
1827 const Decl *D = GD.getDecl(); in GetOrCreateLLVMFunction()
1849 (GD.getCanonicalDecl().getDecl() != in GetOrCreateLLVMFunction()
1851 DiagnosedConflictingDefinitions.insert(GD).second) { in GetOrCreateLLVMFunction()
1915 SetFunctionAttributes(GD, F, IsIncompleteFunction, IsThunk); in GetOrCreateLLVMFunction()
1930 GD.getDtorType())) in GetOrCreateLLVMFunction()
1931 addDeferredDeclToEmit(F, GD); in GetOrCreateLLVMFunction()
1961 addDeferredDeclToEmit(F, GD.getWithDecl(FD)); in GetOrCreateLLVMFunction()
1982 llvm::Constant *CodeGenModule::GetAddrOfFunction(GlobalDecl GD, in GetAddrOfFunction() argument
1989 const auto *FD = cast<FunctionDecl>(GD.getDecl()); in GetAddrOfFunction()
1994 StringRef MangledName = getMangledName(GD); in GetAddrOfFunction()
1995 return GetOrCreateLLVMFunction(MangledName, Ty, GD, ForVTable, DontDefer, in GetAddrOfFunction()
2179 CodeGenModule::GetAddrOfGlobal(GlobalDecl GD, in GetAddrOfGlobal() argument
2181 if (isa<CXXConstructorDecl>(GD.getDecl())) in GetAddrOfGlobal()
2182 return getAddrOfCXXStructor(cast<CXXConstructorDecl>(GD.getDecl()), in GetAddrOfGlobal()
2183 getFromCtorType(GD.getCtorType()), in GetAddrOfGlobal()
2186 else if (isa<CXXDestructorDecl>(GD.getDecl())) in GetAddrOfGlobal()
2187 return getAddrOfCXXStructor(cast<CXXDestructorDecl>(GD.getDecl()), in GetAddrOfGlobal()
2188 getFromDtorType(GD.getDtorType()), in GetAddrOfGlobal()
2191 else if (isa<CXXMethodDecl>(GD.getDecl())) { in GetAddrOfGlobal()
2193 cast<CXXMethodDecl>(GD.getDecl())); in GetAddrOfGlobal()
2195 return GetAddrOfFunction(GD, Ty, /*ForVTable=*/false, /*DontDefer=*/false, in GetAddrOfGlobal()
2197 } else if (isa<FunctionDecl>(GD.getDecl())) { in GetAddrOfGlobal()
2198 const CGFunctionInfo &FI = getTypes().arrangeGlobalDeclaration(GD); in GetAddrOfGlobal()
2200 return GetAddrOfFunction(GD, Ty, /*ForVTable=*/false, /*DontDefer=*/false, in GetAddrOfGlobal()
2203 return GetAddrOfGlobalVar(cast<VarDecl>(GD.getDecl()), /*Ty=*/nullptr, in GetAddrOfGlobal()
2867 void CodeGenModule::EmitGlobalFunctionDefinition(GlobalDecl GD, in EmitGlobalFunctionDefinition() argument
2869 const auto *D = cast<FunctionDecl>(GD.getDecl()); in EmitGlobalFunctionDefinition()
2872 const CGFunctionInfo &FI = getTypes().arrangeGlobalDeclaration(GD); in EmitGlobalFunctionDefinition()
2877 GV = cast<llvm::GlobalValue>(GetAddrOfFunction(GD, Ty, /*ForVTable=*/false, in EmitGlobalFunctionDefinition()
2890 setFunctionLinkage(GD, Fn); in EmitGlobalFunctionDefinition()
2891 setFunctionDLLStorageClass(GD, Fn); in EmitGlobalFunctionDefinition()
2913 void CodeGenModule::EmitAliasDefinition(GlobalDecl GD) { in EmitAliasDefinition() argument
2914 const auto *D = cast<ValueDecl>(GD.getDecl()); in EmitAliasDefinition()
2918 StringRef MangledName = getMangledName(GD); in EmitAliasDefinition()
2931 Aliases.push_back(GD); in EmitAliasDefinition()
2939 Aliasee = GetOrCreateLLVMFunction(AA->getAliasee(), DeclTy, GD, in EmitAliasDefinition()
2989 void CodeGenModule::emitIFuncDefinition(GlobalDecl GD) { in emitIFuncDefinition() argument
2990 const auto *D = cast<ValueDecl>(GD.getDecl()); in emitIFuncDefinition()
2994 StringRef MangledName = getMangledName(GD); in emitIFuncDefinition()
3006 DiagnosedConflictingDefinitions.insert(GD).second) { in emitIFuncDefinition()
3014 Aliases.push_back(GD); in emitIFuncDefinition()
3018 GetOrCreateLLVMFunction(IFA->getResolver(), DeclTy, GD, in emitIFuncDefinition()
4009 GlobalDecl GD(cast<FunctionDecl>(D)); in EmitDeferredUnusedCoverageMappings() local
4010 PGO.emitEmptyCounterMapping(D, getMangledName(GD), in EmitDeferredUnusedCoverageMappings()
4011 getFunctionLinkage(GD)); in EmitDeferredUnusedCoverageMappings()
4016 GlobalDecl GD(cast<CXXConstructorDecl>(D), Ctor_Base); in EmitDeferredUnusedCoverageMappings() local
4017 PGO.emitEmptyCounterMapping(D, getMangledName(GD), in EmitDeferredUnusedCoverageMappings()
4018 getFunctionLinkage(GD)); in EmitDeferredUnusedCoverageMappings()
4023 GlobalDecl GD(cast<CXXDestructorDecl>(D), Dtor_Base); in EmitDeferredUnusedCoverageMappings() local
4024 PGO.emitEmptyCounterMapping(D, getMangledName(GD), in EmitDeferredUnusedCoverageMappings()
4025 getFunctionLinkage(GD)); in EmitDeferredUnusedCoverageMappings()
4124 GlobalDecl GD = GlobalDecl(cast<VarDecl>(D)); in EmitDeclMetadata() local
4125 EmitGlobalDeclMetadata(CGM, GlobalMetadata, GD, GV); in EmitDeclMetadata()