forked from OSchip/llvm-project
[PPC64] Remove support for ELF V1 ABI in LLD - buildbot fix
Fix buildbot error, failure to build with msvc due to error C2446 Use switch instead of ternary operator. Differential Revision: https://reviews.llvm.org/D46316 llvm-svn: 331534
This commit is contained in:
parent
425f48d480
commit
edc7a8c1e5
|
@ -97,10 +97,17 @@ PPC64::PPC64() {
|
|||
static uint32_t getEFlags(InputFile *File) {
|
||||
// Get the e_flag from the input file and issue an error if incompatible
|
||||
// e_flag encountered.
|
||||
|
||||
uint32_t EFlags = Config->IsLE ?
|
||||
cast<ObjFile<ELF64LE>>(File)->getObj().getHeader()->e_flags :
|
||||
cast<ObjFile<ELF64BE>>(File)->getObj().getHeader()->e_flags;
|
||||
uint32_t EFlags;
|
||||
switch (Config->EKind) {
|
||||
case ELF64BEKind:
|
||||
EFlags = cast<ObjFile<ELF64BE>>(File)->getObj().getHeader()->e_flags;
|
||||
break;
|
||||
case ELF64LEKind:
|
||||
EFlags = cast<ObjFile<ELF64LE>>(File)->getObj().getHeader()->e_flags;
|
||||
break;
|
||||
default:
|
||||
llvm_unreachable("unknown Config->EKind");
|
||||
}
|
||||
if (EFlags > 2) {
|
||||
error("incompatible e_flags: " + toString(File));
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue