Update clang to r339409.
Change-Id: I800772d2d838223be1f6b40d490c4591b937fca2
diff --git a/linux-x64/clang/include/llvm/IR/Instruction.h b/linux-x64/clang/include/llvm/IR/Instruction.h
index 76bc401..643c2a0 100644
--- a/linux-x64/clang/include/llvm/IR/Instruction.h
+++ b/linux-x64/clang/include/llvm/IR/Instruction.h
@@ -128,6 +128,7 @@
const char *getOpcodeName() const { return getOpcodeName(getOpcode()); }
bool isTerminator() const { return isTerminator(getOpcode()); }
bool isBinaryOp() const { return isBinaryOp(getOpcode()); }
+ bool isIntDivRem() const { return isIntDivRem(getOpcode()); }
bool isShift() { return isShift(getOpcode()); }
bool isCast() const { return isCast(getOpcode()); }
bool isFuncletPad() const { return isFuncletPad(getOpcode()); }
@@ -142,6 +143,10 @@
return Opcode >= BinaryOpsBegin && Opcode < BinaryOpsEnd;
}
+ static inline bool isIntDivRem(unsigned Opcode) {
+ return Opcode == UDiv || Opcode == SDiv || Opcode == URem || Opcode == SRem;
+ }
+
/// Determine if the Opcode is one of the shift instructions.
static inline bool isShift(unsigned Opcode) {
return Opcode >= Shl && Opcode <= AShr;
@@ -284,7 +289,7 @@
/// Return the debug location for this node as a DebugLoc.
const DebugLoc &getDebugLoc() const { return DbgLoc; }
- /// Set or clear the nsw flag on this instruction, which must be an operator
+ /// Set or clear the nuw flag on this instruction, which must be an operator
/// which supports this flag. See LangRef.html for the meaning of this flag.
void setHasNoUnsignedWrap(bool b = true);
@@ -542,7 +547,7 @@
/// may have side effects cannot be removed without semantically changing the
/// generated program.
bool isSafeToRemove() const;
-
+
/// Return true if the instruction is a variety of EH-block.
bool isEHPad() const {
switch (getOpcode()) {
@@ -556,6 +561,14 @@
}
}
+ /// Return a pointer to the next non-debug instruction in the same basic
+ /// block as 'this', or nullptr if no such instruction exists.
+ const Instruction *getNextNonDebugInstruction() const;
+ Instruction *getNextNonDebugInstruction() {
+ return const_cast<Instruction *>(
+ static_cast<const Instruction *>(this)->getNextNonDebugInstruction());
+ }
+
/// Create a copy of 'this' instruction that is identical in all ways except
/// the following:
/// * The instruction has no parent
@@ -590,7 +603,7 @@
/// be identical.
/// @returns true if the specified instruction is the same operation as
/// the current one.
- /// @brief Determine if one instruction is the same operation as another.
+ /// Determine if one instruction is the same operation as another.
bool isSameOperationAs(const Instruction *I, unsigned flags = 0) const;
/// Return true if there are any uses of this instruction in blocks other than