The MSVC runtime library does not provide a definition of wmemcmp,
so we need an inline implementation.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Doesn't this give the wrong ordering for little-endian machines? Won't we say the code point 0xFF00 comes before 0x00FF because it's encoded 0x00, 0xFF vs 0xFF, 0x00?
clang/lib/CodeGen/CGBuiltin.cpp | ||
---|---|---|
1771–1774 ↗ | (On Diff #131168) | Should we be more explicit about where 2 comes from? Maybe getTypeAlignInChars(WCharTy)? |
clang/lib/CodeGen/CGBuiltin.cpp | ||
---|---|---|
1771–1774 ↗ | (On Diff #131168) | Sure, works for me. |
Comment Actions
lgtm
clang/lib/CodeGen/CGBuiltin.cpp | ||
---|---|---|
1771–1774 ↗ | (On Diff #131168) | I guess this would handle the (unreasonable) corner case of using wmemcmp, MSVC CRT, and -fno-short-wchar. O_o Anyway, looks good. |