[llvm-debuginfo-analyzer] LLVM 16.0.0-rc1 Failing test on osx-64.
authorCarlos Alberto Enciso <carlos.alberto.enciso@gmail.com>
Mon, 13 Feb 2023 05:25:17 +0000 (05:25 +0000)
committerCarlos Alberto Enciso <carlos.alberto.enciso@gmail.com>
Mon, 13 Feb 2023 05:47:04 +0000 (05:47 +0000)
commit92716a42a6aa584fb009031a9f703b5dac310043
treea655b120de3c546c730b57db66b6909f90d163af
parentb49b429fde3a282664289d7a2155d994085eb232
[llvm-debuginfo-analyzer] LLVM 16.0.0-rc1 Failing test on osx-64.

As describe in

https://github.com/llvm/llvm-project/issues/60363

the following DebugInfo LogicalView Tests unit tests failed:

- ELFReader
- SelectElements

The tests fail only on the OSX-64 platform with the CMake options:

-DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON

Using the same options on a Linux platform all the tests pass:
- https://lab.llvm.org/buildbot/#/builders/196
- llvm-x86_64-debian-dylib

Basically it is a dynamic library initialization affecting a static
instance for the string pool (LVStringPool).

That string pool instance is accessed by all the logical elements
to store/retrieve any associated string during the creation of the
logical view.

For a logical view comparison, both logical readers (Reference and
Target) use retrieved indexes when comparing their strings.

Moved the static instance to LVSupport module (unnamed namespace).

Reviewed By: jmorse

Differential Revision: https://reviews.llvm.org/D143716
llvm/include/llvm/DebugInfo/LogicalView/Core/LVElement.h
llvm/include/llvm/DebugInfo/LogicalView/Core/LVStringPool.h
llvm/include/llvm/DebugInfo/LogicalView/Core/LVSupport.h
llvm/lib/DebugInfo/LogicalView/Core/LVSupport.cpp