olista01 added inline comments.
================
Comment at: lib/Frontend/CompilerInvocation.cpp:1133
+ if (Arg *A = Args.getLastArg(OPT_msign_return_address_EQ)) {
+ const auto SignScopeKey = StringRef(A->getValue()).split('+');
+ StringRef SignScope = SignScopeKey.first;
----------------
The driver code is emitting a separate -msign-return-address-key= option, but
this is expecting the key to still be part of -msign-return-address=, so we can
never end up selecting the B key. Out of the two approaches, I prefer having
multiple simpler options in CC1, so that we don't have to repeat all of the
parsing that happens in the driver.
Also, you're emitting the -mbranch-target-enforce option in the driver, but not
handling it here. We should either reject it in the driver for now, or add the
CC1 part of that in this patch.
https://reviews.llvm.org/D51429
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits