aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/ConstantRange.cpp
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2016-02-22 16:13:02 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2016-02-22 16:13:02 +0000
commit5079f6260f03c791d7125322d1d3247c0e97e79a (patch)
tree67bab3e58834f925c7e5eb0a27b96fe1d8c42acb /llvm/lib/IR/ConstantRange.cpp
parent527a4205505155503de1fb1daecea472ba95358b (diff)
downloadllvm-5079f6260f03c791d7125322d1d3247c0e97e79a.zip
llvm-5079f6260f03c791d7125322d1d3247c0e97e79a.tar.gz
llvm-5079f6260f03c791d7125322d1d3247c0e97e79a.tar.bz2
[ConstantRange] Rename a method and add more doc
Rename makeNoWrapRegion to a more obvious makeGuaranteedNoWrapRegion, and add a comment about the counter-intuitive aspects of the function. This is to help prevent cases like PR26628. llvm-svn: 261532
Diffstat (limited to 'llvm/lib/IR/ConstantRange.cpp')
-rw-r--r--llvm/lib/IR/ConstantRange.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/IR/ConstantRange.cpp b/llvm/lib/IR/ConstantRange.cpp
index 460b778..9bea98c 100644
--- a/llvm/lib/IR/ConstantRange.cpp
+++ b/llvm/lib/IR/ConstantRange.cpp
@@ -127,9 +127,9 @@ ConstantRange ConstantRange::makeSatisfyingICmpRegion(CmpInst::Predicate Pred,
.inverse();
}
-ConstantRange ConstantRange::makeNoWrapRegion(Instruction::BinaryOps BinOp,
- const APInt &C,
- unsigned NoWrapKind) {
+ConstantRange
+ConstantRange::makeGuaranteedNoWrapRegion(Instruction::BinaryOps BinOp,
+ const APInt &C, unsigned NoWrapKind) {
typedef OverflowingBinaryOperator OBO;
// Computes the intersection of CR0 and CR1. It is different from