forked from OSchip/llvm-project
3513dc245e
Summary: This is a revised version of D41474. When the debug location is parsed in BitcodeReader::parseFunction, the scope and inlinedAt MDNodes are obtained via MDLoader->getMDNodeFwdRefOrNull(), which will create a forward ref if they were not yet loaded. Specifically, if one of these MDNodes is in the module level metadata block, and this is during ThinLTO importing, that metadata block is lazily loaded. Most places in that invoke getMDNodeFwdRefOrNull have a corresponding call to resolveForwardRefsAndPlaceholders which will take care of resolving them. E.g. places that call getMetadataFwdRefOrLoad, or at the end of parsing a function-level metadata block, or at the end of the initial lazy load of module level metadata in order to handle invocations of getMDNodeFwdRefOrNull for named metadata and global object attachments. However, the calls for the scope/inlinedAt of debug locations are not backed by any such call to resolveForwardRefsAndPlaceholders. To fix this, change the scope and inlinedAt parsing to instead use getMetadataFwdRefOrLoad, which will ensure the forward refs to lazily loaded metadata are resolved. Fixes PR35472. Reviewers: dexonsmith, Sunil_Srivastava, vsk Subscribers: inglorion, eraman, steven_wu, sebpop, mehdi_amini, dmikulin, vsk, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D53596 llvm-svn: 345095 |
||
---|---|---|
.. | ||
benchmarks | ||
bindings | ||
cmake | ||
docs | ||
examples | ||
include | ||
lib | ||
projects | ||
resources | ||
runtimes | ||
test | ||
tools | ||
unittests | ||
utils | ||
.arcconfig | ||
.clang-format | ||
.clang-tidy | ||
.gitattributes | ||
.gitignore | ||
CMakeLists.txt | ||
CODE_OWNERS.TXT | ||
CREDITS.TXT | ||
LICENSE.TXT | ||
LLVMBuild.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.