[PATCH] D34523: AST: mangle BlockDecls under MS ABI
Saleem Abdulrasool via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Jun 25 20:55:04 PDT 2017
compnerd added a comment.
I can add the nested/nested classes. What were other nested concepts you thinking of?
================
Comment at: lib/AST/MicrosoftMangle.cpp:980-981
+ unsigned Discriminator = BD->getBlockManglingNumber();
+ if (!Discriminator)
+ Discriminator = Context.getBlockId(BD, /*Local=*/false);
+
----------------
majnemer wrote:
> Why isn't it local?
This code path is global blocks only AFAIK.
================
Comment at: lib/AST/MicrosoftMangle.cpp:991-992
+ Out << '@';
+ // void __cdecl
+ Out << "YAX";
+ // struct __block_literal *
----------------
majnemer wrote:
> Can blocks not be given a specific calling convention?
Not AFAIK. The synthetic function here is dispatched through the BlocksRuntime and is assumed to be cdecl.
================
Comment at: lib/AST/MicrosoftMangle.cpp:993-994
+ Out << "YAX";
+ // struct __block_literal *
+ Out << "PA";
+ mangleArtificalTagType(TTK_Struct,
----------------
majnemer wrote:
> Shouldn't we also mangle an 'E' in here on 64-bit platforms?
I suppose that the default handling in x86_64 would give that. I don't have a strong enough opinion on that. I can add that if you think it makes a difference.
Repository:
rL LLVM
https://reviews.llvm.org/D34523
More information about the cfe-commits
mailing list