#include "llvm/Transforms/Utils/PromoteMemToReg.h"
#include "llvm/Transforms/Utils/Local.h"
#include "llvm/Support/Debug.h"
+#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/GetElementPtrTypeIterator.h"
#include "llvm/Support/IRBuilder.h"
#include "llvm/Support/MathExtras.h"
assert(NumElements == 2 && "Unhandled case!");
// All users of the GEP must be loads. At each use of the GEP, insert
// two loads of the appropriate indexed GEP and select between them.
- Value *IsOne = new ICmpInst(ICmpInst::ICMP_NE, I.getOperand(),
+ Value *IsOne = new ICmpInst(GEPI, ICmpInst::ICMP_NE, I.getOperand(),
Context->getNullValue(I.getOperand()->getType()),
- "isone", GEPI);
+ "isone");
// Insert the new GEP instructions, which are properly indexed.
SmallVector<Value*, 8> Indices(GEPI->op_begin()+1, GEPI->op_end());
Indices[1] = Context->getNullValue(Type::Int32Ty);
continue;
}
- assert(0 && "Unsupported operation!");
- abort();
+ LLVM_UNREACHABLE("Unsupported operation!");
}
}