aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/IR/Operator.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/IR/Operator.h')
-rw-r--r--include/llvm/IR/Operator.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/include/llvm/IR/Operator.h b/include/llvm/IR/Operator.h
index 0933f21..46935ce 100644
--- a/include/llvm/IR/Operator.h
+++ b/include/llvm/IR/Operator.h
@@ -34,12 +34,12 @@ class Operator : public User {
private:
// The Operator class is intended to be used as a utility, and is never itself
// instantiated.
- void *operator new(size_t, unsigned) LLVM_DELETED_FUNCTION;
- void *operator new(size_t s) LLVM_DELETED_FUNCTION;
- Operator() LLVM_DELETED_FUNCTION;
+ void *operator new(size_t, unsigned) = delete;
+ void *operator new(size_t s) = delete;
+ Operator() = delete;
protected:
- // NOTE: Cannot use LLVM_DELETED_FUNCTION because it's not legal to delete
+ // NOTE: Cannot use = delete because it's not legal to delete
// an overridden method that's not deleted in the base class. Cannot leave
// this unimplemented because that leads to an ODR-violation.
~Operator();
@@ -504,6 +504,20 @@ public:
}
};
+class BitCastOperator
+ : public ConcreteOperator<Operator, Instruction::BitCast> {
+ friend class BitCastInst;
+ friend class ConstantExpr;
+
+public:
+ Type *getSrcTy() const {
+ return getOperand(0)->getType();
+ }
+
+ Type *getDestTy() const {
+ return getType();
+ }
+};
} // End llvm namespace