[clang] [SystemZ][z/OS] Add visibility features for z/OS (eg. _Export, pragma export) (PR #111035)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 7 11:36:05 PDT 2024
================
@@ -1273,6 +1273,168 @@ void Sema::AddImplicitMSFunctionNoBuiltinAttr(FunctionDecl *FD) {
FD->addAttr(NoBuiltinAttr::CreateImplicit(Context, V.data(), V.size()));
}
+static bool typeListMatches(FunctionDecl *FD,
+ const clang::Sema::SymbolLabel &Label) {
+ assert(Label.TypeList.has_value());
+ if (FD->getNumParams() != Label.TypeList->size()) {
+ return false;
+ }
+
+ // Check if arguments match.
+ for (unsigned i = 0; i != FD->getNumParams(); ++i) {
+ const ParmVarDecl *PVD = FD->getParamDecl(i);
+ QualType ParmType = PVD->getOriginalType().getCanonicalType();
----------------
efriedma-quic wrote:
Using getOriginalType() here seems weird; does that really produce the result you want? Please add tests with function parameters that decay (array/function types).
https://github.com/llvm/llvm-project/pull/111035
More information about the cfe-commits
mailing list