Changed EABIVersion type from string to llvm::EABI.
It seems it was just a typo and this is intended implementation.
Details
Diff Detail
- Build Status
Buildable 7884 Build 7884: arc lint + arc unit
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 | How about assigning directly to Opts.EABIVersion? If you do, you can eliminate this temporary variable. |
clang/lib/Frontend/CompilerInvocation.cpp | ||
---|---|---|
2550 | 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 | Sorry for the silly typo. I meant "in terms of the type system". |
clang/lib/Frontend/CompilerInvocation.cpp | ||
---|---|---|
2550 | 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 | I'm fine with your code. Mine was just a suggestion. |
How about assigning directly to Opts.EABIVersion? If you do, you can eliminate this temporary variable.