| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Port some floating point options to new option marshalling infrastructure This ports a number of OpenCL and fast-math flags for floating point over to the new marshalling infrastructure. As part of this, Opt{In,Out}FFlag were enhanced to allow other flags to imply them, via DefaultAnyOf<>. For example: defm signed_zeros : OptOutFFlag<"signed-zeros", ..., "LangOpts->NoSignedZero", DefaultAnyOf<[cl_no_signed_zeros, menable_unsafe_fp_math]>>; defines -fsigned-zeros (false) and -fno-signed-zeros (true) linked to the keypath LangOpts->NoSignedZero, defaulting to false, but set to true implicitly if one of -cl-no-signed-zeros or -menable-unsafe-fp-math is on. Note that the initial patch was written Daniel Grumberg. Differential Revision: https://reviews.llvm.org/D82756 | 5 年前 | |
[clang][cli] Specify KeyPath prefixes via TableGen classes It turns out we need to handle LangOptions separately from the rest of the options. LangOptions used to be conditionally parsed only when !(DashX.getFormat() == InputKind::Precompiled || DashX.getLanguage() == Language::LLVM_IR) and we need to restore this order (for more info, see D94682). We could do this similarly to how DiagnosticOptions are handled: via a counterpart to the IsDiag mix-in (e.g. IsLang). These mix-ins would prefix the option key path with the appropriate CompilerInvocation::XxxOpts member. However, this solution would be problematic, as we'd now have two kinds of options (Lang and Diag) with seemingly incomplete key paths in the same file. To understand what CompilerInvocation member an option affects, one would need to read the whole option definition and notice the IsDiag or IsLang class. Instead, this patch introduces more robust way to handle different kinds of options separately: via the KeyPathAndMacroPrefix class. We have one specialization of that class per CompilerInvocation member (e.g. LangOpts, DiagnosticOpts, etc.). Now, instead of specifying a key path with "LangOpts->UndefPrefixes", we use LangOpts<"UndefPrefixes">. This keeps the readability intact (you don't have to look for the IsLang mix-in, the key path is complete on its own) and allows us to specify a custom macro prefix within LangOpts. Reviewed By: Bigcheese Differential Revision: https://reviews.llvm.org/D94676 | 5 年前 | |
[OptTable] Reapply Improve error message output for grouped short options This reapplies 71d7fed3bc2ad6c22729d446526a59fcfd99bd03 which was reverted by 3e2bd82f02c6cbbfb0544897c7645867f04b3a7e. This change includes the fix for breaking the sanitizer bots. As seen in https://bugs.llvm.org/show_bug.cgi?id=48880 the current implementation for parsing grouped short options can return unclear error messages. This change fixes the example given in the ticket in which a flag is incorrectly given an argument. Also when parsing a group we now keep reading past the first incorrect option and output errors for all incorrect options in the group. Differential Revision: https://reviews.llvm.org/D108770 | 4 年前 | |
[clang][cli] Accept strings instead of options in ImpliedByAnyOf To be able to refer to constant keypaths (e.g. defvar cplusplus = LangOpts<"CPlusPlus">) inside ImpliedByAnyOf, let's accept strings instead of Option instances. This somewhat weakens the guarantees that we're referring to an existing (option) record, but we can still use the option.KeyPath syntax to simulate this. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D95344 | 5 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 5 年前 | ||
| 5 年前 | ||
| 4 年前 | ||
| 5 年前 |