rnk added a subscriber: luken-google.
rnk added a comment.
+@luken-google
================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:6497
+ options::OPT_fno_aligned_allocation) &&
+ LanguageStandard == "-std=c++17")
+ CmdArgs.push_back("-faligned-allocation");
----------------
Only for C++17, and not C++17 and above?
================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:6641
// by default.
if (Arg *A = Args.getLastArg(options::OPT_faligned_allocation,
options::OPT_fno_aligned_allocation,
----------------
steplong wrote:
> There's a check here for faligned-allocation, but I wasn't sure how to get
> the c++ standard here. Also, I couldn't figure a clean way to compare if the
> standard was c++17 onwards, so I just enabled -faligned-allocation for C++17
> above
What I would do is to compute a boolean above and use it as the default value
here. The -cc1 line should be canonical, it shouldn't have duplicate,
potentially contradictory flags.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127641/new/
https://reviews.llvm.org/D127641
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits