[PATCH] D152321: [clang] Replace use of Type::getPointerTo() (NFC)
Youngsuk Kim via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 15 13:19:31 PDT 2023
JOE1994 added inline comments.
================
Comment at: clang/lib/CodeGen/TargetInfo.cpp:2045
if (IsIndirect)
- LLTy = LLTy->getPointerTo(0);
+ LLTy = llvm::PointerType::get(getVMContext(), 0);
FrameFields.push_back(LLTy);
----------------
nikic wrote:
> getLLVMContext?
`getLLVMContext` doesn't seem available in this context.
Below is the build error message I get when using `getLLVMContext`.
```
~/llvm-project/clang/lib/CodeGen/TargetInfo.cpp: In member function 'void {anonymous}::X86_32ABIInfo::addFieldToArgStruct(llvm::SmallVector<llvm::Type*, 6>&, clang::CharUnits&, clang::CodeGen::ABIArgInfo&, clang::QualType) const':
~/llvm-project/clang/lib/CodeGen/TargetInfo.cpp:2057:41: error: 'getLLVMContext' was not declared in this scope; did you mean 'getVMContext'?
```
On line 2066, `getVMContext` is used when a `LLVMContext&` is needed.
So I just followed it to use `getVMContext` on line 2057.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152321/new/
https://reviews.llvm.org/D152321
More information about the cfe-commits
mailing list