[PATCH] D93922: Mangle `__alignof__` differently than `alignof`.

Richard Smith - zygoloid via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 20 11:47:24 PST 2021


rsmith added inline comments.


================
Comment at: clang/lib/AST/ItaniumMangle.cpp:4010
+    if (Context.getASTContext().getLangOpts().getClangABICompat() >=
+        LangOptions::ClangABI::Ver11) {
+      Out << "u8__uuidof";
----------------
Should this be `>= Ver12` / `> Ver11` (given that we already released version 11 and it didn't do this)?


================
Comment at: clang/lib/AST/ItaniumMangle.cpp:4025
+        QualType UuidT = UE->getTypeOperand(Context.getASTContext());
+        Out << 't';
+        mangleType(UuidT);
----------------
It looks like we've lost the `u8__uuidof` prefix on this side. Did you intend to emit that unconditionally above?


================
Comment at: clang/lib/AST/ItaniumMangle.cpp:4349
+      if (Context.getASTContext().getLangOpts().getClangABICompat() >=
+          LangOptions::ClangABI::Ver11) {
+        Out << "u11__alignof__";
----------------
Presumably this should be `> Ver11`, as above.


================
Comment at: clang/test/CodeGenCXX/microsoft-uuidof-mangling.cpp:54
+// CHECK: call void @_Z15test_uuidofTypeI10TestStructEvDTu8__uuidofT_EE(
+// CHECK: call void @_Z15test_uuidofExprI9HasMemberEvDTu8__uuidofXsrT_6memberEEE(
 // CHECK: define linkonce_odr void @_ZN8UUIDTestI10TestStructL_Z42_GUID_eafa1952_66f8_438b_8fba_af1bbae42191EEC1Ev
----------------
Please consider adding test coverage for `-fclang-abi-compat` for `__uuidof` too.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93922/new/

https://reviews.llvm.org/D93922



More information about the llvm-commits mailing list