aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST/ByteCode/Pointer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/ByteCode/Pointer.cpp')
-rw-r--r--clang/lib/AST/ByteCode/Pointer.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/AST/ByteCode/Pointer.cpp b/clang/lib/AST/ByteCode/Pointer.cpp
index 8abdc54b..79b47c2 100644
--- a/clang/lib/AST/ByteCode/Pointer.cpp
+++ b/clang/lib/AST/ByteCode/Pointer.cpp
@@ -720,6 +720,10 @@ IntPointer IntPointer::atOffset(const ASTContext &ASTCtx,
IntPointer IntPointer::baseCast(const ASTContext &ASTCtx,
unsigned BaseOffset) const {
+ if (!Desc) {
+ assert(Value == 0);
+ return *this;
+ }
const Record *R = Desc->ElemRecord;
const Descriptor *BaseDesc = nullptr;