diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2025-05-09 14:24:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-09 14:24:54 +0200 |
commit | 5ae2aed218470783e6c7a2d255c7946f4549cb46 (patch) | |
tree | d3b2eaa76f766e1712cf3d26bc419907f7d047a9 /clang/lib/CodeGen/CGClass.cpp | |
parent | c64c64db7b4b30dc5c5fad3b854f567254d1a615 (diff) | |
download | llvm-5ae2aed218470783e6c7a2d255c7946f4549cb46.zip llvm-5ae2aed218470783e6c7a2d255c7946f4549cb46.tar.gz llvm-5ae2aed218470783e6c7a2d255c7946f4549cb46.tar.bz2 |
clang: Remove dest LangAS argument from performAddrSpaceCast (#138866)
It isn't used and is redundant with the result pointer type argument.
A more reasonable API would only have LangAS parameters, or IR parameters,
not both. Not all values have a meaningful value for this. I'm also
not sure why we have this at all, it's not overridden by any targets and
further simplification is possible.
Diffstat (limited to 'clang/lib/CodeGen/CGClass.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGClass.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp index a8c4823..befbfc6 100644 --- a/clang/lib/CodeGen/CGClass.cpp +++ b/clang/lib/CodeGen/CGClass.cpp @@ -2132,8 +2132,8 @@ void CodeGenFunction::EmitCXXConstructorCall(const CXXConstructorDecl *D, unsigned TargetThisAS = getContext().getTargetAddressSpace(ThisAS); llvm::Type *NewType = llvm::PointerType::get(getLLVMContext(), TargetThisAS); - ThisPtr = getTargetHooks().performAddrSpaceCast(*this, ThisPtr, ThisAS, - SlotAS, NewType); + ThisPtr = + getTargetHooks().performAddrSpaceCast(*this, ThisPtr, ThisAS, NewType); } // Push the this ptr. |