[llvm] r312326 - [MergeICmps] Fix build of rL312315 on clang-with-thin-lto-windows:
Clement Courbet via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 1 04:51:23 PDT 2017
Author: courbet
Date: Fri Sep 1 04:51:23 2017
New Revision: 312326
URL: http://llvm.org/viewvc/llvm-project?rev=312326&view=rev
Log:
[MergeICmps] Fix build of rL312315 on clang-with-thin-lto-windows:
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;
^
Modified:
llvm/trunk/lib/Transforms/Scalar/MergeICmps.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/MergeICmps.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/MergeICmps.cpp?rev=312326&r1=312325&r2=312326&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/MergeICmps.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/MergeICmps.cpp Fri Sep 1 04:51:23 2017
@@ -45,14 +45,16 @@ namespace {
// 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;
};
More information about the llvm-commits
mailing list