diff options
Diffstat (limited to 'lib/CodeGen/CGCXXABI.cpp')
-rw-r--r-- | lib/CodeGen/CGCXXABI.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGCXXABI.cpp b/lib/CodeGen/CGCXXABI.cpp index aba5d75..91795b9 100644 --- a/lib/CodeGen/CGCXXABI.cpp +++ b/lib/CodeGen/CGCXXABI.cpp @@ -189,7 +189,7 @@ void CGCXXABI::ReadArrayCookie(CodeGenFunction &CGF, llvm::Value *ptr, llvm::Value *&numElements, llvm::Value *&allocPtr, CharUnits &cookieSize) { // Derive a char* in the same address space as the pointer. - unsigned AS = cast<llvm::PointerType>(ptr->getType())->getAddressSpace(); + unsigned AS = ptr->getType()->getPointerAddressSpace(); llvm::Type *charPtrTy = CGF.Int8Ty->getPointerTo(AS); ptr = CGF.Builder.CreateBitCast(ptr, charPtrTy); |