[PATCH] [-cxx-abi microsoft] Mangle declarations inside of extern "C" functions
David Majnemer
david.majnemer at gmail.com
Sun Sep 8 21:00:55 PDT 2013
Hi pcc, rnk, cdavis5x, timurrrr, whunt,
Main and extern "C" functions are very special. main in particular has
a unique mangling regardless of how it is phrased:
(int main(void), int main(int, char * []), int main(int, char **)) all
are mangled the same when in contexts that aren't "bare-function"
extern "C" functions don't get their parameter or return types mangled.
Furthermore, declaration mangling for extern "C" functions in template
arguments works out completely differently.
To get this much right, the logic behind working out which declarations
needed "C++" mangling had to be reworked.
Note, this *still* doesn't catch all of the corner cases...
http://llvm-reviews.chandlerc.com/D1627
Files:
lib/AST/MicrosoftMangle.cpp
test/CodeGenCXX/mangle-ms-extern-local.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1627.1.patch
Type: text/x-patch
Size: 12055 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130908/6f2ee22e/attachment.bin>
More information about the cfe-commits
mailing list