rsmith accepted this revision.
rsmith added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lib/Driver/ToolChains/Darwin.cpp:2027
+      isAlignedAllocationUnavailable())
     CC1Args.push_back("-faligned-alloc-unavailable");
 }
----------------
Quuxplusone wrote:
> Peanut gallery asks: Why is the cc1 option spelled differently from the clang 
> driver option? Don't they do the same thing?
At the `-cc1` level, there are three different levels:
 * no aligned allocation in the language
 * aligned allocation in the language but it doesn't work (eg, C++17 on old 
Darwin)
 * aligned allocation in the language and it works

The driver aligned allocation flags force the compilation into case 1 or 3. 
Cases 1 and 2 do not advertise `__cpp_aligned_new`. Case 2 provides an error if 
an aligned allocation is attempted, whereas case 1 provides an underaligned 
allocation with a warning. This flag puts us into case 2, so it isn't the same 
as any driver flag.


https://reviews.llvm.org/D45015



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D45015: [... Richard Smith - zygoloid via Phabricator via cfe-commits

Reply via email to