================
@@ -5602,6 +5602,22 @@ void CXXNameMangler::mangleExpression(const Expr *E, 
unsigned Arity,
       MangleAlignofSizeofArg();
       break;
 
+    case UETT_AddrSpaceOf: {
+      if (SAE->isArgumentType()) {
+        MangleExtensionBuiltin(SAE);
+        break;
+      }
+
+      // Normal expression mangling ignores parentheses, but __addrspaceof(x)
+      // and __addrspaceof((x)) can have different values. Record whether the
+      // operand uses the entity form before mangling the operand itself.
+      mangleVendorType(getTraitSpelling(SAE->getKind()));
+      bool IsEntity = isUnparenthesizedIdOrMemberExpr(SAE->getArgumentExpr());
+      Out << (IsEntity ? "Lb1E" : "Lb0E");
----------------
AaronBallman wrote:

Be sure to add tests which require a microsoft ABI to ensure we do something 
sensible there.

https://github.com/llvm/llvm-project/pull/210242
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to