[clang] [CIR] Emit allocas into the proper lexical scope (PR #132468)
Bruno Cardoso Lopes via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 24 10:50:51 PDT 2025
================
@@ -293,7 +294,8 @@ void CIRGenFunction::startFunction(GlobalDecl gd, QualType returnType,
mlir::Value addrVal =
emitAlloca(cast<NamedDecl>(paramVar)->getName(),
- convertType(paramVar->getType()), paramLoc, alignment);
+ convertType(paramVar->getType()), paramLoc, alignment,
+ /*insertIntoFnEntryBlock=*/false);
----------------
bcardosolopes wrote:
I guess here it won't make a difference but for consistency maybe better to leave the default as `true`? Leaving it as false can be confusing as to the intent (even tho in practice won't make a difference).
https://github.com/llvm/llvm-project/pull/132468
More information about the cfe-commits
mailing list