diff options
author | James Y Knight <jyknight@google.com> | 2016-04-11 22:52:42 +0000 |
---|---|---|
committer | James Y Knight <jyknight@google.com> | 2016-04-11 22:52:42 +0000 |
commit | 00db547f97dd4b2d355b569cd6069f8d303fc560 (patch) | |
tree | 7e66c2a0a70d387acf034d55ea38a200f27560f4 /llvm/lib/CodeGen/AtomicExpandPass.cpp | |
parent | 15c41b25c79d18bf3eaa5cf419c79884e26aa6e2 (diff) | |
download | bcm5719-llvm-00db547f97dd4b2d355b569cd6069f8d303fc560.tar.gz bcm5719-llvm-00db547f97dd4b2d355b569cd6069f8d303fc560.zip |
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
Diffstat (limited to 'llvm/lib/CodeGen/AtomicExpandPass.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AtomicExpandPass.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/AtomicExpandPass.cpp b/llvm/lib/CodeGen/AtomicExpandPass.cpp index a8003c614cd..3f84580d6d0 100644 --- a/llvm/lib/CodeGen/AtomicExpandPass.cpp +++ b/llvm/lib/CodeGen/AtomicExpandPass.cpp @@ -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."); } |