[PATCH] D34595: Changed Opts.EABIVersion type string to llvm::EABI enum class

Yuka Takahashi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 30 20:10:17 PDT 2017


yamaguchi added inline comments.


================
Comment at: clang/lib/Frontend/CompilerInvocation.cpp:2550
     StringRef Value = A->getValue();
     llvm::EABI EABIVersion = llvm::StringSwitch<llvm::EABI>(Value)
                                  .Case("default", llvm::EABI::Default)
----------------
ruiu wrote:
> ruiu wrote:
> > yamaguchi wrote:
> > > ruiu wrote:
> > > > How about assigning directly to Opts.EABIVersion? If you do, you can eliminate this temporary variable.
> > > @ruiu 
> > > I thought about it, but I was not sure if we can set llvm::EABI::Unknown to Opts.EABIVersion.
> > 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?
> Sorry for the silly typo. I meant "in terms of the type system".
I'm not very happy about setting invalid value to Opts.EABIVersion, but I will change this if you strongly feel so.


https://reviews.llvm.org/D34595





More information about the llvm-commits mailing list