[PATCH] D18596: [MSVC] PR27132: Proper mangling for __unaligned qualifier

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 30 09:17:51 PDT 2016


rnk added inline comments.

================
Comment at: include/clang/Basic/AttrDocs.td:1970
@@ +1969,3 @@
+
+This modifier makes sense for IPF targets only; Clang supports proper mangling
+of the variables with ``unaligned`` modifier, but it doesn't affect generated
----------------
I don't think "IPF targets" will be understood by readers to mean "Itanium targets". I'd just drop everything before the semicolon. At some point, we might want to add support `__unaligned __m128*`. Today we'll copy that with movaps.

================
Comment at: lib/Sema/SemaType.cpp:5555
@@ -5552,1 +5554,3 @@
+  // anything, so this is an exception.
+  if (!isa<PointerType>(Desugared) && (Kind != AttributeList::AT_Unaligned)) {
     if (Type->isMemberPointerType())
----------------
aaron.ballman wrote:
> This appears to be untested, but really should have a test case to ensure we don't regress later.
+1, although I recall that someone else from Intel wanted to make sure this test case works:
  struct A { void g() __unaligned {} };
I could take it or leave it. I don't think that rejecting this program will break very much real code.


http://reviews.llvm.org/D18596





More information about the cfe-commits mailing list