diff options
Diffstat (limited to 'clang/lib/CodeGen/CGDecl.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGDecl.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp index e4fe09c..57bec7f 100644 --- a/clang/lib/CodeGen/CGDecl.cpp +++ b/clang/lib/CodeGen/CGDecl.cpp @@ -968,7 +968,11 @@ CodeGenFunction::EmitAutoVarAlloca(const VarDecl &D) { allocaAlignment = alignment; } - address = CreateTempAlloca(allocaTy, allocaAlignment, D.getName()); + // Create the alloca. Note that we set the name separately from + // building the instruction so that it's there even in no-asserts + // builds. + address = CreateTempAlloca(allocaTy, allocaAlignment); + address.getPointer()->setName(D.getName()); // Emit a lifetime intrinsic if meaningful. There's no point // in doing this if we don't have a valid insertion point (?). |