Changed EABIVersion type from string to llvm::EABI.
It seems it was just a typo and this is intended implementation.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Nice find!
Looks like the original intention of this code is to convert a string to an enum value and then initialize Opts.EABIVersion with the enum. So I wonder if we should change the type of Opts.EABIVersion (which is defined in clang/include/clang/Basic/TargetOptions.h) from std::string to llvm::EABI and keep the StringSwitch.
clang/lib/Frontend/CompilerInvocation.cpp | ||
---|---|---|
2550 ↗ | (On Diff #104976) | How about assigning directly to Opts.EABIVersion? If you do, you can eliminate this temporary variable. |
clang/lib/Frontend/CompilerInvocation.cpp | ||
---|---|---|
2550 ↗ | (On Diff #104976) | In terms of your system, you can. And if you abort when it is Unknown, it doesn't matter whether it's unknown or not, no? |
clang/lib/Frontend/CompilerInvocation.cpp | ||
---|---|---|
2550 ↗ | (On Diff #104976) | Sorry for the silly typo. I meant "in terms of the type system". |
clang/lib/Frontend/CompilerInvocation.cpp | ||
---|---|---|
2550 ↗ | (On Diff #104976) | I'm not very happy about setting invalid value to Opts.EABIVersion, but I will change this if you strongly feel so. |
LGTM
clang/lib/Frontend/CompilerInvocation.cpp | ||
---|---|---|
2550 ↗ | (On Diff #104976) | I'm fine with your code. Mine was just a suggestion. |