[PATCH] D48928: [ms] Fix mangling of string literals used to initialize arrays larger or smaller than the literal

2018-07-06 Thread Hans Wennborg via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. hans marked 2 inline comments as done. Closed by commit rC336415: [ms] Fix mangling of string literals used to initialize arrays larger or… (authored by hans, committed by ). Changed prior to commit:

[PATCH] D48928: [ms] Fix mangling of string literals used to initialize arrays larger or smaller than the literal

2018-07-06 Thread Hans Wennborg via Phabricator via cfe-commits
hans marked 3 inline comments as done. hans added inline comments. Comment at: lib/AST/MicrosoftMangle.cpp:3198 + ->getSize() + .getZExtValue(); + thakis wrote: > nit: Also do `unsigned StingByteLength =

[PATCH] D48928: [ms] Fix mangling of string literals used to initialize arrays larger or smaller than the literal

2018-07-05 Thread Nico Weber via Phabricator via cfe-commits
thakis accepted this revision. thakis added a comment. This revision is now accepted and ready to land. Nice! Comment at: lib/AST/MicrosoftMangle.cpp:3198 + ->getSize() + .getZExtValue(); + nit: Also do

[PATCH] D48928: [ms] Fix mangling of string literals used to initialize arrays larger or smaller than the literal

2018-07-04 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. I couldn't get MSVC to create a symbol with padding at the end; they seem to always insert the padding with a separate loop during initialization, but this does show the truncated case: https://godbolt.org/g/B8ktA3 https://reviews.llvm.org/D48928

[PATCH] D48928: [ms] Fix mangling of string literals used to initialize arrays larger or smaller than the literal

2018-07-04 Thread Hans Wennborg via Phabricator via cfe-commits
hans created this revision. hans added reviewers: thakis, majnemer. A Chromium developer reported a bug which turned out to be a mangling collision between these two literals: char s[] = "foo"; char t[32] = "foo"; They may look the same, but for the initialization of t we will (under some