[PATCH] D40929: Unblock Swift Calling Convention Mangling on Windows
Thomas Roughton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 15 00:59:18 PST 2017
troughton marked an inline comment as done.
troughton added a comment.
> Which, I think is just adding something wacky like `@swiftcc at __Swift@@` which would demangle as `__Swift::swiftcc` if the demangler expected an NNS there. Of course, it doesn't, so it won't demangle, but at least you can overload between cdecl and swiftcc then.
Could we do a combination of these? Use the `A` prefix for the CC slot but then append the `@swiftcc at __Swift@@` at the end of the qualified name? That way you could still distinguish a SwiftCC function and have it correctly demangle with existing tools.
As for emitting a proper diagnostic: we definitely can do something better here. I wasn't sure what to base it off so went with the simplest option, but given that `CodeGenModule::ErrorUnsupported` example I'll take a look and try to implement something similar.
Comment at: lib/AST/MicrosoftMangle.cpp:2133
+ llvm::errs() << "Unsupported CC for mangling: " << CC << ".\n";
> You still need the default label, right?
Oops, yes. Thanks. I've added it back.
More information about the cfe-commits