aboutsummaryrefslogtreecommitdiff
path: root/llvm/include/llvm/IR/Type.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include/llvm/IR/Type.h')
-rw-r--r--llvm/include/llvm/IR/Type.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/include/llvm/IR/Type.h b/llvm/include/llvm/IR/Type.h
index c899c46d4055..98c97375ad7b 100644
--- a/llvm/include/llvm/IR/Type.h
+++ b/llvm/include/llvm/IR/Type.h
@@ -366,7 +366,16 @@ public:
return ContainedTys[0];
}
+ /// This method is deprecated without replacement. Pointer element types are
+ /// not available with opaque pointers.
Type *getPointerElementType() const {
+ return getNonOpaquePointerElementType();
+ }
+
+ /// Only use this method in code that is not reachable with opaque pointers,
+ /// or part of deprecated methods that will be removed as part of the opaque
+ /// pointers transition.
+ Type *getNonOpaquePointerElementType() const {
assert(getTypeID() == PointerTyID);
assert(NumContainedTys &&
"Attempting to get element type of opaque pointer");