aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaModule.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2024-06-24 09:40:09 +0200
committerGitHub <noreply@github.com>2024-06-24 09:40:09 +0200
commit957dc4366dd2ce9d5d2991c3ad76bbf438e9954e (patch)
tree210efa869d2cfc52b43bd7d028a3ac06fb5f540b /clang/lib/Sema/SemaModule.cpp
parentabf5969f76c6b4196b08fe5ea9c2890e97a61357 (diff)
downloadllvm-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