[cfe-commits] [Windows] Fix mangling of repeatead types in presence of bool and function pointers PR13177, PR13176

João Matos ripzonetriton at gmail.com
Fri Jun 22 17:00:33 PDT 2012


> Can you please review the attached patch?
>
> It fixes two issues with the mangler:
> http://llvm.org/bugs/show_bug.cgi?id=13176
> http://llvm.org/bugs/show_bug.cgi?id=13177

Hi, was just testing the patch you posted on 13177. Nice to see a fix
for 13176 too!

+    size_t out_size_before = Out.GetNumBytesInBuffer();

Please change to LLVM coding standard (OutSizeBefore).

+    if (TypeBackReferences.size() < 10 &&
+        (Out.GetNumBytesInBuffer() - out_size_before > 1)) {
+      size_t Size = TypeBackReferences.size();
+      TypeBackReferences[TypePtr] = Size;

Can you factor the second condition?

Something like: bool IsBackRef = (Out.GetNumBytesInBuffer() -
OutSizeBefore) > 1;

Also the comment should probably read 1 character instead of letter.

Otherwise looks solid and good to go!

On Fri, Jun 22, 2012 at 10:21 PM, Timur Iskhodzhanov
<timurrrr at google.com> wrote:
> Hi Charles, João, John,
>
> Can you please review the attached patch?
>
> It fixes two issues with the mangler:
> http://llvm.org/bugs/show_bug.cgi?id=13176
> http://llvm.org/bugs/show_bug.cgi?id=13177
>
> It also adds a few more tests for repeated types which were mangled OK
> before, but might be worth some extra coverage.
>
> Thanks,
> Timur Iskhodzhanov,
> Google Russia



-- 
João Matos




More information about the cfe-commits mailing list