aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Value.cpp
diff options
context:
space:
mode:
authorJoshua Cranmer <joshua.cranmer@intel.com>2022-08-04 10:41:11 -0400
committerJoshua Cranmer <joshua.cranmer@intel.com>2022-08-04 10:41:11 -0400
commit2138c906458ed37f0f833b1c7dda1bc6c6be8236 (patch)
tree5a88fe58c8c46ff1724369d1ea3ddcc6094b4bd1 /llvm/lib/IR/Value.cpp
parent448adfee05b737a26dda34e7ae2cd4948760fff0 (diff)
downloadllvm-2138c906458ed37f0f833b1c7dda1bc6c6be8236.zip
llvm-2138c906458ed37f0f833b1c7dda1bc6c6be8236.tar.gz
llvm-2138c906458ed37f0f833b1c7dda1bc6c6be8236.tar.bz2
[IR] Move support for dxil::TypedPointerType to LLVM core IR.
This allows the construct to be shared between different backends. However, it still remains illegal to use TypedPointerType in LLVM IR--the type is intended to remain an auxiliary type, not a real LLVM type. So no support is provided for LLVM-C, nor bitcode, nor LLVM assembly (besides the bare minimum needed to make Type->dump() work properly). Reviewed By: beanz, nikic, aeubanks Differential Revision: https://reviews.llvm.org/D130592
Diffstat (limited to 'llvm/lib/IR/Value.cpp')
-rw-r--r--llvm/lib/IR/Value.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/IR/Value.cpp b/llvm/lib/IR/Value.cpp
index 3990536..c707004 100644
--- a/llvm/lib/IR/Value.cpp
+++ b/llvm/lib/IR/Value.cpp
@@ -25,6 +25,7 @@
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Operator.h"
+#include "llvm/IR/TypedPointerType.h"
#include "llvm/IR/ValueHandle.h"
#include "llvm/IR/ValueSymbolTable.h"
#include "llvm/Support/CommandLine.h"
@@ -43,6 +44,8 @@ static cl::opt<unsigned> UseDerefAtPointSemantics(
//===----------------------------------------------------------------------===//
static inline Type *checkType(Type *Ty) {
assert(Ty && "Value defined with a null type: Error!");
+ assert(!isa<TypedPointerType>(Ty) &&
+ "Cannot have values with typed pointer types");
return Ty;
}