rnk added inline comments.
Comment at: lib/AST/Mangle.cpp:142
@@ +141,3 @@
+ // language).
+ if (MCXX || (CC == CM_Other && TI.getCXXABI() == TargetCXXABI::Microsoft))
+return mangleCXXName(D, Out);
TI.getCXXABI().isMicrosoft() is better than the == check.
compnerd added inline comments.
Comment at: lib/AST/Mangle.cpp:139
@@ -149,2 +138,3 @@
- Out << '\01';
+ // shouldMangleCXXName lies sometimes for the MS-ABI, so check the CC
mangling
+ // when targeting MS-ABI (it doesnt consider CC which take precedence over
--
majnemer added a subscriber: majnemer.
Comment at: lib/AST/Mangle.cpp:130
@@ +129,3 @@
+ // ObjectiveC/C++ cannot support alternate calling conventions due to method
+ // dispatch. Honour the mangling irrespective of the annotations.
+ if (const ObjCMethodDecl *OMD = dyn_cast(
compnerd added inline comments.
Comment at: lib/AST/Mangle.cpp:191
@@ -199,3 +190,3 @@
else
-Out << "_block_invoke_" << discriminator+1;
+Out << "_block_invoke_" << discriminator + 1;
}
Drive by reformat.
Comment at: test/CodeGen/pr96