[PATCH] D34595: Changed Opts.EABIVersion type string to llvm::EABI enum class
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 30 20:05:09 PDT 2017
ruiu 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:
> 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".
https://reviews.llvm.org/D34595
More information about the llvm-commits
mailing list