diff --git a/llvm/unittests/Support/ConvertUTFTest.cpp b/llvm/unittests/Support/ConvertUTFTest.cpp --- a/llvm/unittests/Support/ConvertUTFTest.cpp +++ b/llvm/unittests/Support/ConvertUTFTest.cpp @@ -16,7 +16,7 @@ TEST(ConvertUTFTest, ConvertUTF16LittleEndianToUTF8String) { // 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"; ArrayRef Ref(Src, sizeof(Src) - 1); std::string Result; bool Success = convertUTF16ToUTF8String(Ref, Result); @@ -27,7 +27,7 @@ TEST(ConvertUTFTest, ConvertUTF16BigEndianToUTF8String) { // Src is the look of disapproval. - static const char Src[] = "\xfe\xff\x0c\xa0\x00_\x0c\xa0"; + static const char Src[] __attribute__((aligned (sizeof(UTF16)))) = "\xfe\xff\x0c\xa0\x00_\x0c\xa0"; ArrayRef Ref(Src, sizeof(Src) - 1); std::string Result; bool Success = convertUTF16ToUTF8String(Ref, Result);