aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CGException.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2025-05-09 14:24:54 +0200
committerGitHub <noreply@github.com>2025-05-09 14:24:54 +0200
commit5ae2aed218470783e6c7a2d255c7946f4549cb46 (patch)
treed3b2eaa76f766e1712cf3d26bc419907f7d047a9 /clang/lib/CodeGen/CGException.cpp
parentc64c64db7b4b30dc5c5fad3b854f567254d1a615 (diff)
downloadllvm-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/CGException.cpp')
-rw-r--r--clang/lib/CodeGen/CGException.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGException.cpp b/clang/lib/CodeGen/CGException.cpp
index ebecb3a..e036728 100644
--- a/clang/lib/CodeGen/CGException.cpp
+++ b/clang/lib/CodeGen/CGException.cpp
@@ -1156,9 +1156,8 @@ static void emitCatchDispatchBlock(CodeGenFunction &CGF,
assert(typeValue && "fell into catch-all case!");
// With opaque ptrs, only the address space can be a mismatch.
if (typeValue->getType() != argTy)
- typeValue =
- CGF.getTargetHooks().performAddrSpaceCast(CGF, typeValue, globAS,
- LangAS::Default, argTy);
+ typeValue = CGF.getTargetHooks().performAddrSpaceCast(CGF, typeValue,
+ globAS, argTy);
// Figure out the next block.
bool nextIsEnd;