[PATCH] D14184: [clang] Add initial support for -meabi flag

Vinicius Tinti via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 30 10:33:23 PDT 2015

tinti added inline comments.

Comment at: lib/Frontend/CompilerInvocation.cpp:458
@@ +457,3 @@
+    StringRef Value = A->getValue();
+    bool Valid = llvm::StringSwitch<bool>(Value)
+      .Case("default", true)
tinti wrote:
> compnerd wrote:
> > If `llvm::EABI::EABIVersionType` had an `Invalid` value in the enumeration, you could convert directly to the value here, and report the error if the value was `Invalid`.
> I chose this way because none of the other target options have it [1].
> Do you prefer with it?
> [1] https://github.com/llvm-mirror/llvm/blob/master/include/llvm/Target/TargetOptions.h#L27
Looks like that in LLVM the Invalid is not defined but in Clang there are target specific enums that define them [1].

[1] https://github.com/llvm-mirror/clang/blob/master/lib/Driver/Tools.h#L263


More information about the cfe-commits mailing list