================
Comment at: lib/AST/MicrosoftMangle.cpp:889
@@ -888,4 +888,3 @@
   case TemplateArgument::Integral:
-    mangleIntegerLiteral(TA.getAsIntegral(),
-                         TA.getIntegralType()->isBooleanType());
+    mangleIntegerLiteral(TA.getAsIntegral(), /*IsBoolean=*/false);
     break;
----------------
Richard Smith wrote:
> What's the reason for this change? If it's OK to pass false here, do we need 
> the IsBoolean parameter at all?
An unrelated change slipped in, sorry.

================
Comment at: lib/AST/MicrosoftMangle.cpp:894
@@ +893,3 @@
+  case TemplateArgument::NullPtr: {
+    mangleIntegerLiteral(llvm::APSInt(/*BitWidth=*/64), /*IsBoolean=*/false);
+    break;
----------------
Richard Smith wrote:
> Sending nullptr_t through the integer literal codepath seems unnecessary. All 
> we really know here is that nullptr_t appears to be mangled as A@, so maybe 
> just emit that directly.
While we could do that, I think it makes the mangling scheme a bit more 
complicated semantically and it decentralizes the mechanism of choosing how to 
mangle zero-ish things.

As an example: bool template arguments. True and false aren't given special 
mangling behavior. We "boolify" the integral value, treat the result as an 
integer and mangle **that** value.


http://llvm-reviews.chandlerc.com/D1284
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to