forked from OSchip/llvm-project
Fix compile with GCC after r266002 (Add __atomic_* lowering to AtomicExpandPass)
It doesn't like implicitly calling the ArrayRef constructor with a returned array -- it appears to decays the returned value to a pointer, first, before trying to make an ArrayRef out of it. llvm-svn: 266011
This commit is contained in:
parent
15c41b25c7
commit
00db547f97
|
@ -1065,25 +1065,25 @@ static ArrayRef<RTLIB::Libcall> GetRMWLibcall(AtomicRMWInst::BinOp Op) {
|
|||
case AtomicRMWInst::BAD_BINOP:
|
||||
llvm_unreachable("Should not have BAD_BINOP.");
|
||||
case AtomicRMWInst::Xchg:
|
||||
return LibcallsXchg;
|
||||
return ArrayRef<RTLIB::Libcall>(LibcallsXchg);
|
||||
case AtomicRMWInst::Add:
|
||||
return LibcallsAdd;
|
||||
return ArrayRef<RTLIB::Libcall>(LibcallsAdd);
|
||||
case AtomicRMWInst::Sub:
|
||||
return LibcallsSub;
|
||||
return ArrayRef<RTLIB::Libcall>(LibcallsSub);
|
||||
case AtomicRMWInst::And:
|
||||
return LibcallsAnd;
|
||||
return ArrayRef<RTLIB::Libcall>(LibcallsAnd);
|
||||
case AtomicRMWInst::Or:
|
||||
return LibcallsOr;
|
||||
return ArrayRef<RTLIB::Libcall>(LibcallsOr);
|
||||
case AtomicRMWInst::Xor:
|
||||
return LibcallsXor;
|
||||
return ArrayRef<RTLIB::Libcall>(LibcallsXor);
|
||||
case AtomicRMWInst::Nand:
|
||||
return LibcallsNand;
|
||||
return ArrayRef<RTLIB::Libcall>(LibcallsNand);
|
||||
case AtomicRMWInst::Max:
|
||||
case AtomicRMWInst::Min:
|
||||
case AtomicRMWInst::UMax:
|
||||
case AtomicRMWInst::UMin:
|
||||
// No atomic libcalls are available for max/min/umax/umin.
|
||||
return {};
|
||||
return ArrayRef<RTLIB::Libcall>();
|
||||
}
|
||||
llvm_unreachable("Unexpected AtomicRMW operation.");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue