[PATCH] D125783: [llvm-debuginfo-analyzer] 08 - ELF Reader

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 2 10:59:20 PDT 2022


thakis added inline comments.


================
Comment at: llvm/unittests/DebugInfo/LogicalView/CMakeLists.txt:9
 
-add_llvm_unittest(DebugInfoLogicalViewTests
+add_llvm_unittest_with_input_files(DebugInfoLogicalViewTests
   CommandLineOptionsTest.cpp
----------------
CarlosAlbertoEnciso wrote:
> CarlosAlbertoEnciso wrote:
> > thakis wrote:
> > > See:
> > > 
> > > ```
> > > # Use for test binaries that call llvm::getInputFileDirectory(). Use of this
> > > # is discouraged.
> > > function(add_unittest_with_input_files test_suite test_name)
> > > ```
> > > 
> > > Any chance you could write this test without needing getInputFileDirectory()?
> > There is only one remaining patch (09-codeview-reader) for the `llvm-debuginfo-analyzer` tool; it changes this file to include the `CodeViewReaderTest.cpp` which uses the `getInputFileDirectory` call.
> > 
> > I will explore the option to remove the call to `getInputFileDirectory` in that patch.
> I was not able to rewrite the test without using `getInputFileDirectory`. Looked at other test cases that include a binary file and they use the same approach.
Any chance you could use a lit test instead of a unit test for this then?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125783/new/

https://reviews.llvm.org/D125783



More information about the llvm-commits mailing list