This is an archive of the discontinued LLVM Phabricator instance.

[PDB] Treat `char`, `signed char` and `unsigned char` as three different types
ClosedPublic

Authored by aleksandr.urakov on Sep 25 2018, 6:57 AM.

Details

Summary

char, signed char and unsigned char are three different types, and they are mangled differently:

void __declspec(dllexport) /* ?foo@@YAXD@Z */ foo(char c) { } 
void __declspec(dllexport) /* ?foo@@YAXE@Z */ foo(unsigned char c) { }
void __declspec(dllexport) /* ?foo@@YAXC@Z */ foo(signed char c) { }

Diff Detail

Repository
rL LLVM

Event Timeline

asmith accepted this revision.Sep 27 2018, 12:54 PM

LGTM

This revision is now accepted and ready to land.Sep 27 2018, 12:54 PM
zturner accepted this revision.Sep 27 2018, 4:02 PM

Can you change the description of the patch before submitting it? It's hard to understand why the change does what the description says it does, because the description mentions 3 types of chars but the patch only handles 1. I would just make the description say "handle char as a builtin type" or something

Yes, sure! Thanks all!

This revision was automatically updated to reflect the committed changes.