================
@@ -3537,6 +3540,23 @@ void CIRGenModule::setCXXSpecialMemberAttr(
}
}
+void CIRGenModule::setFuncIdentityAttr(cir::FuncOp funcOp,
+ const clang::FunctionDecl *funcDecl) {
+ // Only a free std function with a plain identifier can match a known
+ // entity, so members, static members, and operators never take a tag.
+ // Inline namespaces, like the versioning namespace of libc++, count as
+ // part of std.
+ if (!funcDecl || !funcDecl->getIdentifier() || isa<CXXMethodDecl>(funcDecl)
||
+ !funcDecl->isInStdNamespace())
+ return;
+
+ // The names and the tags come from CIRStdOps.td, and the recognizer
+ // checks the shape of each call.
+ if (funcDecl->getName() == cir::StdFindOp::getFunctionName())
----------------
erichkeane wrote:
This seems like we really need to set up a `llvm::StringSwitch` on the name for
a name->enum conversion function.
https://github.com/llvm/llvm-project/pull/208854
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits