aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2024-06-24 15:00:11 +0200
committerGitHub <noreply@github.com>2024-06-24 15:00:11 +0200
commit5cd0ba30f53d11835dbfd05ad4071d397387fb04 (patch)
treef82e4b26861f63fed771a50c5075c75a7e1cc4ad /clang/lib/CodeGen/CodeGenFunction.cpp
parent0cf1e662b13fb20d3897c5b9055c60b0de50beca (diff)
downloadllvm-5cd0ba30f53d11835dbfd05ad4071d397387fb04.zip
llvm-5cd0ba30f53d11835dbfd05ad4071d397387fb04.tar.gz
llvm-5cd0ba30f53d11835dbfd05ad4071d397387fb04.tar.bz2
Reapply [IR] Lazily initialize the class to pass name mapping (NFC) (#96321) (#96462)
On MSVC the `this` uses inside `decltype` require a lambda capture. On clang they result in an unused capture warning instead. Add the capture and suppress the warning with `(void)this`. ----- Initializing this map is somewhat expensive (especially for O0), so we currently only do it if certain flags are used. I would like to make use of it for crash dumps (#96078), where we don't know in advance whether it will be needed or not. This patch changes the initialization to a lazy approach, where a callback is registered that does the actual initialization. The callbacks will be run the first time the pass name is requested. This way there is no compile-time impact if the mapping is not used.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions