MergeICmps.cpp(68,15): error: chosen constructor is explicit in copy-initialization
return {};
APInt.h(339,12): note: explicit constructor declared here
explicit APInt() : BitWidth(1) { U.VAL = 0; }
^
MergeICmps.cpp(56,9): note: in implicit initialization of field 'Offset' with omitted
initializer
APInt Offset;
^
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312326
91177308-0d34-0410-b5e6-
96231b3b80d8
// A BCE atom.
struct BCEAtom {
+ BCEAtom() : GEP(nullptr), LoadI(nullptr), Offset() {}
+
const Value *Base() const { return GEP ? GEP->getPointerOperand() : nullptr; }
bool operator<(const BCEAtom &O) const {
return Base() == O.Base() ? Offset.slt(O.Offset) : Base() < O.Base();
}
- GetElementPtrInst *GEP = nullptr;
- LoadInst *LoadI = nullptr;
+ GetElementPtrInst *GEP;
+ LoadInst *LoadI;
APInt Offset;
};