summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 99423bf443c..75f4a470212 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -4416,6 +4416,7 @@ const Optional<ByteProvider> calculateByteProvider(SDValue Op, unsigned Index,
return None;
unsigned ByteWidth = BitWidth / 8;
assert(Index < ByteWidth && "invalid index requested");
+ (void) ByteWidth;
switch (Op.getOpcode()) {
case ISD::OR: {
@@ -4522,8 +4523,10 @@ SDValue DAGCombiner::MatchLoadCombine(SDNode *N) {
if (LegalOperations && !TLI.isOperationLegal(ISD::LOAD, VT))
return SDValue();
- auto LittleEndianByteAt = [](unsigned BW, unsigned i) { return i; };
- auto BigEndianByteAt = [](unsigned BW, unsigned i) { return BW - i - 1; };
+ std::function<unsigned(unsigned, unsigned)> LittleEndianByteAt = [](
+ unsigned BW, unsigned i) { return i; };
+ std::function<unsigned(unsigned, unsigned)> BigEndianByteAt = [](
+ unsigned BW, unsigned i) { return BW - i - 1; };
Optional<BaseIndexOffset> Base;
SDValue Chain;
OpenPOWER on IntegriCloud