diff options
Diffstat (limited to 'contrib/llvm-project/clang/lib/CodeGen/PatternInit.cpp')
-rw-r--r-- | contrib/llvm-project/clang/lib/CodeGen/PatternInit.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/llvm-project/clang/lib/CodeGen/PatternInit.cpp b/contrib/llvm-project/clang/lib/CodeGen/PatternInit.cpp index 26ac8b63a9ba..4400bc443688 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/PatternInit.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/PatternInit.cpp @@ -43,8 +43,8 @@ llvm::Constant *clang::CodeGen::initializationPatternFor(CodeGenModule &CGM, } if (Ty->isPtrOrPtrVectorTy()) { auto *PtrTy = cast<llvm::PointerType>(Ty->getScalarType()); - unsigned PtrWidth = CGM.getContext().getTargetInfo().getPointerWidth( - PtrTy->getAddressSpace()); + unsigned PtrWidth = + CGM.getDataLayout().getPointerSizeInBits(PtrTy->getAddressSpace()); if (PtrWidth > 64) llvm_unreachable("pattern initialization of unsupported pointer width"); llvm::Type *IntTy = llvm::IntegerType::get(CGM.getLLVMContext(), PtrWidth); |