OSDN Git Service

Fix buildbot failures introduced by 293036
authorArtur Pilipenko <apilipenko@azulsystems.com>
Wed, 25 Jan 2017 09:10:07 +0000 (09:10 +0000)
committerArtur Pilipenko <apilipenko@azulsystems.com>
Wed, 25 Jan 2017 09:10:07 +0000 (09:10 +0000)
Fix unused variable, specify types explicitly to make VC compiler happy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293039 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/DAGCombiner.cpp

index 99423bf..75f4a47 100644 (file)
@@ -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;