[PATCH] D156539: [Clang][CodeGen] `__builtin_alloca`s should care about address spaces too

Alex Voicu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 31 17:47:46 PDT 2023


AlexVlx marked an inline comment as done.
AlexVlx added inline comments.


================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:3542
+    LangAS AAS = getASTAllocaAddressSpace();
+    LangAS EAS = E->getType().getAddressSpace();
+    if (AAS != EAS) {
----------------
rjmccall wrote:
> `E->getType().getAddressSpace()` is actually the top-level qualification of the type; you need `E->getType()->getPointeeType().getAddressSpace()`.
D'oh! I will probably never avoid getting tripped by this, sorry for the noise.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156539/new/

https://reviews.llvm.org/D156539



More information about the cfe-commits mailing list