[clang] [clang][FMV][AArch64] Improve streaming mode compatibility. (PR #100181)

Alexandros Lamprineas via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 24 07:11:37 PDT 2024


================
@@ -11145,7 +11148,24 @@ bool Sema::areMultiversionVariantFunctionsCompatible(
     FunctionType::ExtInfo OldTypeInfo = OldType->getExtInfo();
     FunctionType::ExtInfo NewTypeInfo = NewType->getExtInfo();
 
-    if (OldTypeInfo.getCC() != NewTypeInfo.getCC())
+    const auto *OldFPT = OldFD->getType()->getAs<FunctionProtoType>();
+    const auto *NewFPT = NewFD->getType()->getAs<FunctionProtoType>();
+
+    bool ArmStreamingCCMismatched = false;
+    // Locally streaming does not affect the calling convention.
+    if (OldFPT && NewFPT && !OldFD->hasAttr<ArmLocallyStreamingAttr>() &&
+        !NewFD->hasAttr<ArmLocallyStreamingAttr>()) {
----------------
labrinea wrote:

Thanks for clarifying! Ok, I'll fix the interaction with locally_streaming in a new revision. Your last example cannot be supported for the reason I explain on the commit message.

https://github.com/llvm/llvm-project/pull/100181


More information about the cfe-commits mailing list