diff options
author | Clement Courbet <courbet@google.com> | 2017-09-01 11:51:23 +0000 |
---|---|---|
committer | Clement Courbet <courbet@google.com> | 2017-09-01 11:51:23 +0000 |
commit | bc0c4459c9d34067adc45d31320e0d51e347b39f (patch) | |
tree | 7ce16ec0f96d034438bece8b7db15a5024988f93 /llvm/lib | |
parent | d6ee877b23978c1acb61f764e137b59b9d72fcb6 (diff) | |
download | bcm5719-llvm-bc0c4459c9d34067adc45d31320e0d51e347b39f.tar.gz bcm5719-llvm-bc0c4459c9d34067adc45d31320e0d51e347b39f.zip |
[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;
^
llvm-svn: 312326
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/Scalar/MergeICmps.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/MergeICmps.cpp b/llvm/lib/Transforms/Scalar/MergeICmps.cpp index 3bd24eb8601..7bd730014c8 100644 --- a/llvm/lib/Transforms/Scalar/MergeICmps.cpp +++ b/llvm/lib/Transforms/Scalar/MergeICmps.cpp @@ -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; }; |