diff options
author | Nikita Popov <npopov@redhat.com> | 2024-06-24 09:40:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-24 09:40:09 +0200 |
commit | 957dc4366dd2ce9d5d2991c3ad76bbf438e9954e (patch) | |
tree | 210efa869d2cfc52b43bd7d028a3ac06fb5f540b /clang/lib/Sema/SemaModule.cpp | |
parent | abf5969f76c6b4196b08fe5ea9c2890e97a61357 (diff) | |
download | llvm-957dc4366dd2ce9d5d2991c3ad76bbf438e9954e.zip llvm-957dc4366dd2ce9d5d2991c3ad76bbf438e9954e.tar.gz llvm-957dc4366dd2ce9d5d2991c3ad76bbf438e9954e.tar.bz2 |
[IR] Lazily initialize the class to pass name mapping (NFC) (#96321)
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/Sema/SemaModule.cpp')
0 files changed, 0 insertions, 0 deletions