llvm.org GIT mirror llvm / 0a86c4c
Attempt to fix buildbots after commit of r295173. Unit tests needed to check on the endianness of the host platform. (Test was failing for big endian hosts). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295174 91177308-0d34-0410-b5e6-96231b3b80d8 David Bozier 3 years ago
1 changed file(s) with 11 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
77 //===----------------------------------------------------------------------===//
88
99 #include "llvm/Object/SymbolicFile.h"
10 #include "llvm/Support/Host.h"
1011 #include "llvm/Support/raw_ostream.h"
1112 #include "gtest/gtest.h"
1213 #include
2223 sizeof Data.p == sizeof(uint32_t),
2324 "Test expected pointer type to be 32 or 64-bit.");
2425
25 char const *Expected = sizeof Data.p == sizeof(uint64_t)
26 char const *Expected;
27
28 if (llvm::sys::IsLittleEndianHost) {
29 Expected = sizeof Data.p == sizeof(uint64_t)
2630 ? "(0xffffeeee0000 (0xeeee0000, 0x0000ffff))"
2731 : "(0xeeee0000 (0xeeee0000, 0x0000ffff))";
32 }
33 else {
34 Expected = sizeof Data.p == sizeof(uint64_t)
35 ? "(0xeeee00000000ffff (0xeeee0000, 0x0000ffff))"
36 : "(0x0000ffff (0xeeee0000, 0x0000ffff))";
37 }
2838
2939 OS << Data;
3040 OS.flush();