llvm-project/llvm
Fangrui Song eecbb1c776 [llvm-objdump] --source: drop the warning when there is no debug info
Warnings have been added for three cases (PR41905): (1) missing debug info, (2)
the source file cannot be found, (3) the debug info points at a line beyond the
end of the file.

(1) is probably less useful. This was brought up once on
http://lists.llvm.org/pipermail/llvm-dev/2020-April/141264.html and two
internal users mentioned it to me that it was annoying. (I personally
find the warning confusing, too.)

Users specify --source to get additional information if sources happen to be
available.  If sources are not available, it should be obvious as the output
will have no interleaved source lines. The warning can be especially annoying
when using llvm-objdump -S on a bunch of files.

This patch drops the warning when there is no debug info.
(If LLVMSymbolizer::symbolizeCode returns an `Error`, there will still be
an error. There is currently no test for an `Error` return value.
The only code path is probably a broken symbol table, but we probably already emit a warning
in that case)

`source-interleave-prefix.test` has an inappropriate "malformed" test - the test simply has no
.debug_* because new llc does not produce debug info when the filename is empty (invalid).
I have tried tampering the header of .debug_info/.debug_line but llvm-symbolizer does not warn.
This patch does not intend to add the missing test coverage.

Differential Revision: https://reviews.llvm.org/D88715
2021-02-04 09:07:44 -08:00
..
benchmarks
bindings
cmake Fix CMake LLVM_TARGETS_TO_BUILD "Native" option to work with JIT 2021-02-02 18:47:15 +00:00
docs [NewPM][HelloWorld] Move HelloWorld to Utils 2021-02-03 12:59:40 -08:00
examples [Doc][NFC] Fix Kaleidoscope links, typos and add blog posts for MCJIT 2021-01-25 19:59:36 +05:30
include [ElementCount] NFC: Set 'const' qualifier for getWithIncrement/Decrement. 2021-02-04 11:27:45 +00:00
lib [AMDGPU][GlobalISel] Fix v2s16 right shifts 2021-02-04 17:04:32 +00:00
projects
resources
runtimes
test [llvm-objdump] --source: drop the warning when there is no debug info 2021-02-04 09:07:44 -08:00
tools [llvm-objdump] --source: drop the warning when there is no debug info 2021-02-04 09:07:44 -08:00
unittests [Support] Indent multi-line descr of enum cli options. 2021-02-04 10:14:44 +01:00
utils [libc++] Rename include/support to include/__support 2021-02-04 10:16:33 -05:00
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt Turn on the new pass manager by default 2021-02-03 14:37:46 -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.