Lines Matching defs:FD

95 int RSContext::getForEachSlotNumber(const clang::FunctionDecl* FD) {
96 const clang::StringRef& funcName = FD->getName();
108 bool RSContext::processExportFunc(const clang::FunctionDecl *FD) {
109 slangAssert(!FD->getName().empty() && "Function name should not be empty");
111 if (!FD->isThisDeclarationADefinition()) {
115 slangAssert(FD->getStorageClass() == clang::SC_None);
118 if (RSSpecialFunc::isSpecialRSFunc(mTargetAPI, FD)) {
120 return RSSpecialFunc::validateSpecialFuncDecl(mTargetAPI, this, FD);
124 if (RSExportForEach::isRSForEachFunc(mTargetAPI, FD)) {
125 RSExportForEach *EFE = RSExportForEach::Create(this, FD);
131 if (FD->getName().equals("root")) {
137 if (FD->hasAttr<clang::KernelAttr>()) {
140 getForEachSlotNumber(FD->getName()) ==
152 if (auto *EF = RSExportFunc::Create(this, FD)) {
160 bool RSContext::addForEach(const clang::FunctionDecl* FD) {
161 const llvm::StringRef& funcName = FD->getName();
265 clang::FunctionDecl* FD = llvm::dyn_cast<clang::FunctionDecl>(D);
266 if (FD->getFormalLinkage() == clang::ExternalLinkage) {
267 if (!processExportFunc(FD)) {
320 void RSContext::markUsedByReducePragma(clang::FunctionDecl *FD, CheckName Check) {
321 if (mUsedByReducePragmaFns.find(FD) != mUsedByReducePragmaFns.end())
330 auto NameMatches = [this, FD]() {
332 if ((*I)->matchName(FD->getName()))
341 mUsedByReducePragmaFns.insert(FD);
346 FD->setIsUsed();
359 clang::DeclContext *const DC = FD->getDeclContext();
360 const clang::SourceLocation Loc = FD->getLocation();
364 &mCtx.Idents.get(std::string(".rs.reduce_fn.") + FD->getNameAsString()),
374 FD, false, Loc, FD->getType(),
376 clang::ImplicitCastExpr *const ICE = clang::ImplicitCastExpr::Create(mCtx, mCtx.getPointerType(FD->getType()),