[PATCH] D88824: [Support][unittests] Enforce alignment in ConvertUTFTest

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 6 10:08:03 PDT 2020


rnk requested changes to this revision.
rnk added inline comments.
This revision now requires changes to proceed.


================
Comment at: llvm/unittests/Support/ConvertUTFTest.cpp:19
   // Src is the look of disapproval.
-  static const char Src[] = "\xff\xfe\xa0\x0c_\x00\xa0\x0c";
+  static const char Src[] __attribute__((aligned(sizeof(UTF16)))) =
+      "\xff\xfe\xa0\x0c_\x00\xa0\x0c";
----------------
MSVC doesn't support `__attribute__`, use `alignas(UTF16)` instead. It should be in use elsewhere in the codebase.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88824



More information about the llvm-commits mailing list