aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
diff options
context:
space:
mode:
authorEli Friedman <efriedma@quicinc.com>2023-06-30 15:31:47 -0700
committerEli Friedman <efriedma@quicinc.com>2023-07-02 14:25:25 -0700
commitb4bae3fd8ede10026a6f6e1caaec476125f5ac67 (patch)
treef64728d58942a39fc24ab5212fcf7db460b61fb8 /llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
parent6954cb54252b50df95eea05c513e739b3ad2c8a0 (diff)
downloadllvm-b4bae3fd8ede10026a6f6e1caaec476125f5ac67.zip
llvm-b4bae3fd8ede10026a6f6e1caaec476125f5ac67.tar.gz
llvm-b4bae3fd8ede10026a6f6e1caaec476125f5ac67.tar.bz2
[clang][CodeGen] Fix global variables initialized with an inheriting constructor.
For inheriting constructors which have to be emitted inline, we use CodeGenFunction::EmitInlinedInheritingCXXConstructorCall to emit the required code. This code uses EmitParmDecl to emit the "this" argument of the call. EmitParmDecl then helpfully calls llvm::Value::setName to name the parameter... which renames the global variable to "this". To fix the issue, skip the setName call on globals. The renaming still has slightly weird results in other cases (it renames all local variables initialized with an inlined inheriting constructor to "this"), but the result isn't actually wrong in those cases, so I'm just going to leave it for now. Fixes https://github.com/llvm/llvm-project/issues/63618 Differential Revision: https://reviews.llvm.org/D154270
Diffstat (limited to 'llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp')
0 files changed, 0 insertions, 0 deletions