diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-06-10 19:17:14 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-06-10 19:17:14 +0000 |
commit | db17bf38c59bc172953ed66cfe1b10c03c6bc383 (patch) | |
tree | 2712281fec99b99c2fcafd5b46439dfdd93261aa /contrib/llvm/lib/IR/Instruction.cpp | |
parent | 686fb94a00297bf9ff49d93b948925552a2ce8e0 (diff) | |
parent | 7ab83427af0f77b59941ceba41d509d7d097b065 (diff) |
Merge llvm, clang, lld, lldb, compiler-rt and libc++ r305145, and update
build glue.
Notes
Notes:
svn path=/projects/clang500-import/; revision=319799
Diffstat (limited to 'contrib/llvm/lib/IR/Instruction.cpp')
-rw-r--r-- | contrib/llvm/lib/IR/Instruction.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/llvm/lib/IR/Instruction.cpp b/contrib/llvm/lib/IR/Instruction.cpp index 828e78b13005..3dd653d2d047 100644 --- a/contrib/llvm/lib/IR/Instruction.cpp +++ b/contrib/llvm/lib/IR/Instruction.cpp @@ -11,13 +11,13 @@ // //===----------------------------------------------------------------------===// -#include "llvm/ADT/DenseSet.h" #include "llvm/IR/Instruction.h" +#include "llvm/ADT/DenseSet.h" #include "llvm/IR/CallSite.h" #include "llvm/IR/Constants.h" #include "llvm/IR/Instructions.h" -#include "llvm/IR/Module.h" #include "llvm/IR/MDBuilder.h" +#include "llvm/IR/Module.h" #include "llvm/IR/Operator.h" #include "llvm/IR/Type.h" using namespace llvm; @@ -216,10 +216,10 @@ void Instruction::copyFastMathFlags(const Instruction *I) { copyFastMathFlags(I->getFastMathFlags()); } -void Instruction::copyIRFlags(const Value *V) { +void Instruction::copyIRFlags(const Value *V, bool IncludeWrapFlags) { // Copy the wrapping flags. - if (auto *OB = dyn_cast<OverflowingBinaryOperator>(V)) { - if (isa<OverflowingBinaryOperator>(this)) { + if (IncludeWrapFlags && isa<OverflowingBinaryOperator>(this)) { + if (auto *OB = dyn_cast<OverflowingBinaryOperator>(V)) { setHasNoSignedWrap(OB->hasNoSignedWrap()); setHasNoUnsignedWrap(OB->hasNoUnsignedWrap()); } |