git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359109
91177308-0d34-0410-b5e6-
96231b3b80d8
return Result;
}
+// A mangled (non-wide) string literal stores the total length of the string it
+// refers to (passed in NumBytes), and it contains up to 32 bytes of actual text
+// (passed in StringBytes, NumChars).
static unsigned guessCharByteSize(const uint8_t *StringBytes, unsigned NumChars,
- unsigned NumBytes) {
+ uint64_t NumBytes) {
assert(NumBytes > 0);
// If the number of bytes is odd, this is guaranteed to be a char string.
??_C@_07LJGFEJEB@D3?$CC?$BB?$AA?$AA?$AA?$AA@)
; CHECK: U"\x11223344"
+
+; This has a string length of 0x6_0000_0000, so it's 0 if treated as a 32-bit
+; number. (In practice, 24GiB large string literals should be rare.)
+??_C@_0GAAAAAAAA@GPLEPFHO@01234567890123456789012345678901@
+; CHECK: "01234567890123456789012345678901"...