llvm-project/llvm
David Blaikie cd93ab8947 DWARFVerifier: Don't parse all units twice
Introduced/discussed in https://reviews.llvm.org/D38719

The header validation logic was also explicitly building the DWARFUnits
to validate. But then other calls, like "Units.getUnitForOffset" creates
the DWARFUnits again in the DWARFContext proper - so, let's avoid
creating the DWARFUnits twice by walking the DWARFContext's units rather
than building a new list explicitly.

This does reduce some verifier power - it means that any unit with a
header parsing failure won't get further validation, whereas the
verifier-created units were getting some further validation despite
invalid headers. I don't think this is a great loss/seems "right" in
some ways to me that if the header's invalid we should stop there.

Exposing the raw DWARFUnitVectors from DWARFContext feels a bit
sub-optimal, but gave simple access to the getUnitForOffset to keep the
rest of the code fairly similar.
2021-11-24 14:03:56 -08:00
..
benchmarks
bindings
cmake Revert "[llvm][ubsan] Inclusive language: replace use of blacklist HandleLLVMOptions.cmake" 2021-11-15 18:54:15 +00:00
docs [docs] Incorprate first round of feedback on D114325 2021-11-22 11:02:38 -08:00
examples Revert "Use `GNUInstallDirs` to support custom installation dirs. -- LLVM" 2021-11-02 19:11:44 +01:00
include DWARFVerifier: Don't parse all units twice 2021-11-24 14:03:56 -08:00
lib DWARFVerifier: Don't parse all units twice 2021-11-24 14:03:56 -08:00
projects Remove unused parallel-libs project 2021-10-21 14:34:39 -07:00
resources
runtimes
test DWARFVerifier: Don't parse all units twice 2021-11-24 14:03:56 -08:00
tools Revert "[ThreadPool] Do not return shared futures." 2021-11-24 19:01:47 +00:00
unittests [VP] Canonicalize macros of VPIntrinsics.def 2021-11-23 16:51:11 +01:00
utils [gn build] Port 3b72448084 2021-11-24 15:48:50 +00:00
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt Revert "Reland "[benchmarks] Move libcxx's fork of google/benchmark and llvm/utils'""" 2021-11-16 16:35:06 -08:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.