Lines Matching refs:GD
285 for (const GlobalDecl &GD : Aliases) { in checkAliases() local
286 const auto *D = cast<ValueDecl>(GD.getDecl()); in checkAliases()
288 StringRef MangledName = getMangledName(GD); in checkAliases()
332 for (const GlobalDecl &GD : Aliases) { in checkAliases() local
333 StringRef MangledName = getMangledName(GD); in checkAliases()
613 StringRef CodeGenModule::getMangledName(GlobalDecl GD) { in getMangledName() argument
614 StringRef &FoundStr = MangledDeclNames[GD.getCanonicalDecl()]; in getMangledName()
618 const auto *ND = cast<NamedDecl>(GD.getDecl()); in getMangledName()
624 getCXXABI().getMangleContext().mangleCXXCtor(D, GD.getCtorType(), Out); in getMangledName()
626 getCXXABI().getMangleContext().mangleCXXDtor(D, GD.getDtorType(), Out); in getMangledName()
637 auto Result = Manglings.insert(std::make_pair(Str, GD)); in getMangledName()
641 StringRef CodeGenModule::getBlockMangledName(GlobalDecl GD, in getBlockMangledName() argument
644 const Decl *D = GD.getDecl(); in getBlockMangledName()
652 MangleCtx.mangleCtorBlock(CD, GD.getCtorType(), BD, Out); in getBlockMangledName()
654 MangleCtx.mangleDtorBlock(DD, GD.getDtorType(), BD, Out); in getBlockMangledName()
712 CodeGenModule::getFunctionLinkage(GlobalDecl GD) { in getFunctionLinkage() argument
713 const auto *D = cast<FunctionDecl>(GD.getDecl()); in getFunctionLinkage()
719 GD.getDtorType())) { in getFunctionLinkage()
729 void CodeGenModule::setFunctionDLLStorageClass(GlobalDecl GD, llvm::Function *F) { in setFunctionDLLStorageClass() argument
730 const auto *FD = cast<FunctionDecl>(GD.getDecl()); in setFunctionDLLStorageClass()
733 if (getCXXABI().useThunkForDtorVariant(Dtor, GD.getDtorType())) { in setFunctionDLLStorageClass()
998 void CodeGenModule::SetFunctionAttributes(GlobalDecl GD, llvm::Function *F, in SetFunctionAttributes() argument
1008 const auto *FD = cast<FunctionDecl>(GD.getDecl()); in SetFunctionAttributes()
1011 SetLLVMFunctionAttributes(FD, getTypes().arrangeGlobalDeclaration(GD), F); in SetFunctionAttributes()
1016 if (!IsThunk && getCXXABI().HasThisReturn(GD) && in SetFunctionAttributes()
1228 GlobalDecl D = G.GD; in EmitDeferred()
1464 void CodeGenModule::EmitGlobal(GlobalDecl GD) { in EmitGlobal() argument
1465 const auto *Global = cast<ValueDecl>(GD.getDecl()); in EmitGlobal()
1474 return EmitAliasDefinition(GD); in EmitGlobal()
1500 StringRef MangledName = getMangledName(GD); in EmitGlobal()
1503 const CGFunctionInfo &FI = getTypes().arrangeGlobalDeclaration(GD); in EmitGlobal()
1506 GetOrCreateLLVMFunction(MangledName, Ty, GD, /*ForVTable=*/false, in EmitGlobal()
1524 EmitGlobalDefinition(GD); in EmitGlobal()
1536 StringRef MangledName = getMangledName(GD); in EmitGlobal()
1539 addDeferredDeclToEmit(GV, GD); in EmitGlobal()
1543 addDeferredDeclToEmit(/*GV=*/nullptr, GD); in EmitGlobal()
1548 DeferredDecls[MangledName] = GD; in EmitGlobal()
1637 CodeGenModule::shouldEmitFunction(GlobalDecl GD) { in shouldEmitFunction() argument
1638 if (getFunctionLinkage(GD) != llvm::Function::AvailableExternallyLinkage) in shouldEmitFunction()
1640 const auto *F = cast<FunctionDecl>(GD.getDecl()); in shouldEmitFunction()
1676 void CodeGenModule::EmitGlobalDefinition(GlobalDecl GD, llvm::GlobalValue *GV) { in EmitGlobalDefinition() argument
1677 const auto *D = cast<ValueDecl>(GD.getDecl()); in EmitGlobalDefinition()
1686 if (!shouldEmitFunction(GD)) in EmitGlobalDefinition()
1694 ABI->emitCXXStructor(CD, getFromCtorType(GD.getCtorType())); in EmitGlobalDefinition()
1696 ABI->emitCXXStructor(DD, getFromDtorType(GD.getDtorType())); in EmitGlobalDefinition()
1698 EmitGlobalFunctionDefinition(GD, GV); in EmitGlobalDefinition()
1701 getVTables().EmitThunks(GD); in EmitGlobalDefinition()
1706 return EmitGlobalFunctionDefinition(GD, GV); in EmitGlobalDefinition()
1728 GlobalDecl GD, bool ForVTable, in GetOrCreateLLVMFunction() argument
1732 const Decl *D = GD.getDecl(); in GetOrCreateLLVMFunction()
1754 (GD.getCanonicalDecl().getDecl() != in GetOrCreateLLVMFunction()
1756 DiagnosedConflictingDefinitions.insert(GD).second) { in GetOrCreateLLVMFunction()
1820 SetFunctionAttributes(GD, F, IsIncompleteFunction, IsThunk); in GetOrCreateLLVMFunction()
1835 GD.getDtorType())) in GetOrCreateLLVMFunction()
1836 addDeferredDeclToEmit(F, GD); in GetOrCreateLLVMFunction()
1866 addDeferredDeclToEmit(F, GD.getWithDecl(FD)); in GetOrCreateLLVMFunction()
1887 llvm::Constant *CodeGenModule::GetAddrOfFunction(GlobalDecl GD, in GetAddrOfFunction() argument
1894 const auto *FD = cast<FunctionDecl>(GD.getDecl()); in GetAddrOfFunction()
1899 StringRef MangledName = getMangledName(GD); in GetAddrOfFunction()
1900 return GetOrCreateLLVMFunction(MangledName, Ty, GD, ForVTable, DontDefer, in GetAddrOfFunction()
2042 CodeGenModule::GetAddrOfGlobal(GlobalDecl GD, in GetAddrOfGlobal() argument
2044 if (isa<CXXConstructorDecl>(GD.getDecl())) in GetAddrOfGlobal()
2045 return getAddrOfCXXStructor(cast<CXXConstructorDecl>(GD.getDecl()), in GetAddrOfGlobal()
2046 getFromCtorType(GD.getCtorType()), in GetAddrOfGlobal()
2049 else if (isa<CXXDestructorDecl>(GD.getDecl())) in GetAddrOfGlobal()
2050 return getAddrOfCXXStructor(cast<CXXDestructorDecl>(GD.getDecl()), in GetAddrOfGlobal()
2051 getFromDtorType(GD.getDtorType()), in GetAddrOfGlobal()
2054 else if (isa<CXXMethodDecl>(GD.getDecl())) { in GetAddrOfGlobal()
2056 cast<CXXMethodDecl>(GD.getDecl())); in GetAddrOfGlobal()
2058 return GetAddrOfFunction(GD, Ty, /*ForVTable=*/false, /*DontDefer=*/false, in GetAddrOfGlobal()
2060 } else if (isa<FunctionDecl>(GD.getDecl())) { in GetAddrOfGlobal()
2061 const CGFunctionInfo &FI = getTypes().arrangeGlobalDeclaration(GD); in GetAddrOfGlobal()
2063 return GetAddrOfFunction(GD, Ty, /*ForVTable=*/false, /*DontDefer=*/false, in GetAddrOfGlobal()
2066 return GetAddrOfGlobalVar(cast<VarDecl>(GD.getDecl())); in GetAddrOfGlobal()
2683 void CodeGenModule::EmitGlobalFunctionDefinition(GlobalDecl GD, in EmitGlobalFunctionDefinition() argument
2685 const auto *D = cast<FunctionDecl>(GD.getDecl()); in EmitGlobalFunctionDefinition()
2688 const CGFunctionInfo &FI = getTypes().arrangeGlobalDeclaration(GD); in EmitGlobalFunctionDefinition()
2693 GV = cast<llvm::GlobalValue>(GetAddrOfFunction(GD, Ty, /*ForVTable=*/false, in EmitGlobalFunctionDefinition()
2706 setFunctionLinkage(GD, Fn); in EmitGlobalFunctionDefinition()
2707 setFunctionDLLStorageClass(GD, Fn); in EmitGlobalFunctionDefinition()
2729 void CodeGenModule::EmitAliasDefinition(GlobalDecl GD) { in EmitAliasDefinition() argument
2730 const auto *D = cast<ValueDecl>(GD.getDecl()); in EmitAliasDefinition()
2734 StringRef MangledName = getMangledName(GD); in EmitAliasDefinition()
2747 Aliases.push_back(GD); in EmitAliasDefinition()
2755 Aliasee = GetOrCreateLLVMFunction(AA->getAliasee(), DeclTy, GD, in EmitAliasDefinition()
3698 GlobalDecl GD(cast<FunctionDecl>(D)); in EmitDeferredUnusedCoverageMappings() local
3699 PGO.emitEmptyCounterMapping(D, getMangledName(GD), in EmitDeferredUnusedCoverageMappings()
3700 getFunctionLinkage(GD)); in EmitDeferredUnusedCoverageMappings()
3705 GlobalDecl GD(cast<CXXConstructorDecl>(D), Ctor_Base); in EmitDeferredUnusedCoverageMappings() local
3706 PGO.emitEmptyCounterMapping(D, getMangledName(GD), in EmitDeferredUnusedCoverageMappings()
3707 getFunctionLinkage(GD)); in EmitDeferredUnusedCoverageMappings()
3712 GlobalDecl GD(cast<CXXDestructorDecl>(D), Dtor_Base); in EmitDeferredUnusedCoverageMappings() local
3713 PGO.emitEmptyCounterMapping(D, getMangledName(GD), in EmitDeferredUnusedCoverageMappings()
3714 getFunctionLinkage(GD)); in EmitDeferredUnusedCoverageMappings()
3809 GlobalDecl GD = GlobalDecl(cast<VarDecl>(D)); in EmitDeclMetadata() local
3810 EmitGlobalDeclMetadata(CGM, GlobalMetadata, GD, GV); in EmitDeclMetadata()