[all-commits] [llvm/llvm-project] 620bff: [llvm-addr2line] Replace checkFileExists with getO...

Fangrui Song via All-commits all-commits at lists.llvm.org
Fri Jun 23 10:04:27 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 620bff758d448f04483a80455e14daa91f9c2346
      https://github.com/llvm/llvm-project/commit/620bff758d448f04483a80455e14daa91f9c2346
  Author: Fangrui Song <i at maskray.me>
  Date:   2023-06-23 (Fri, 23 Jun 2023)

  Changed paths:
    M llvm/include/llvm/DebugInfo/Symbolize/Symbolize.h
    M llvm/lib/DebugInfo/Symbolize/Symbolize.cpp
    R llvm/test/tools/llvm-symbolizer/errors.test
    A llvm/test/tools/llvm-symbolizer/input-file-err.test
    M llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp

  Log Message:
  -----------
  [llvm-addr2line] Replace checkFileExists with getOrCreateModuleInfo

GNU addr2line exits immediately if -e (default to a.out) specifies a file that
cannot be open or a directory. llvm-addr2line used to wait for input on if the
input file cannot be open and addresses are not specified in command line.
Replace the D147652 checkFileExists with getOrCreateModuleInfo to avoid
a separate `sys::fs::status` operation.

Reviewed By: sepavloff

Differential Revision: https://reviews.llvm.org/D153595




More information about the All-commits mailing list