summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2013-12-07 02:58:41 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2013-12-07 02:58:41 +0000
commit47172e86cc0f5cf59bd450bc80fb304a2d128aab (patch)
treebe27c12f9f295ac3b2cee8e5bb441cad1dd45fb8 /include
parentca370601667367da3b6e2afc2d47b80bdbd92869 (diff)
downloadllvm-47172e86cc0f5cf59bd450bc80fb304a2d128aab.tar.gz
llvm-47172e86cc0f5cf59bd450bc80fb304a2d128aab.tar.bz2
llvm-47172e86cc0f5cf59bd450bc80fb304a2d128aab.tar.xz
Add getBitCastOrAddrSpaceCast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196637 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/IR/Constants.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/llvm/IR/Constants.h b/include/llvm/IR/Constants.h
index f1cee5a8f7..dac20c9ec5 100644
--- a/include/llvm/IR/Constants.h
+++ b/include/llvm/IR/Constants.h
@@ -943,12 +943,20 @@ public:
Type *Ty ///< The type to trunc or bitcast C to
);
- /// @brief Create a BitCast or a PtrToInt cast constant expression
+ /// @brief Create a BitCast, AddrSpaceCast, or a PtrToInt cast constant
+ /// expression.
static Constant *getPointerCast(
Constant *C, ///< The pointer value to be casted (operand 0)
Type *Ty ///< The type to which cast should be made
);
+ /// @brief Create a BitCast or AddrSpaceCast for a pointer type depending on
+ /// the address space.
+ static Constant *getPointerBitCastOrAddrSpaceCast(
+ Constant *C, ///< The constant to addrspacecast or bitcast
+ Type *Ty ///< The type to bitcast or addrspacecast C to
+ );
+
/// @brief Create a ZExt, Bitcast or Trunc for integer -> integer casts
static Constant *getIntegerCast(
Constant *C, ///< The integer constant to be casted