Files
clang-p2996/lldb/test/API/commands/expression/import-std-module/array/main.cpp
Vladislav Dzhidzhoev 61e2841d8b [lldb][test] Fix some 'import-std-module' tests (#122358)
Some tests from 'import-std-module' used to fail on the builder
https://lab.llvm.org/staging/#/builders/195/builds/4470,
since libcxx is set up to be linked statically with test binaries
on it.

Thus, they were temporarily disabled in #112530. Here, this commit
is reverted.

Jitted expressions from the tests try to call __libcpp_verbose_abort
function that is not present in the process image, which causes
the failure.

Here, this symbol is explicitly referenced from the test source files.
2025-01-13 23:04:53 +01:00

17 lines
408 B
C++

#include <__verbose_abort>
#include <array>
// Some expressons from the test need this symbol to be compiled when libcxx is
// built statically.
void *libcpp_verbose_abort_ptr = (void *)&std::__libcpp_verbose_abort;
struct DbgInfo {
int v = 4;
};
int main(int argc, char **argv) {
std::array<int, 3> a = {3, 1, 2};
std::array<DbgInfo, 1> b{DbgInfo()};
return 0; // Set break point at this line.
}