Files
clang-p2996/llvm/test/tools/dsymutil/Inputs/accel-imported-declaration.cpp
Michael Buch b8ef007fca Reland "[llvm][dsymutil] Add DW_TAG_imported_declaration to accelerator table"
This relands the commit previously reverted in
`8570bee53a8ce0c5d04bc11f288e19a457474c4c` due to failures on linux.

The problem was that the test executable was built with absolute
OSO prefix paths. This re-commit adds a modified version of the
executable that strips the absolute OSO prefix paths and makes
sure the test appends the OSO prefix appropriately (via the appropriate
dsymutil flags).

Differential Revision: https://reviews.llvm.org/D143458
2023-02-10 17:19:07 +00:00

23 lines
597 B
C++

// Compiled on macOS using:
// 1. clang++ -c -std=c++2a -gdwarf-4 -O0 -o accel-imported-declaration.macho-arm64.o
// 2. clang++ -Wl,-oso_prefix=$PWD accel-imported-declaration.macho-arm64.o -o accel-imported-declaration.macho-arm64
//
// In step 2 it's important to strip the absolute object file paths
//
// Verify that the OSO path isn't absolute using `nm -ap accel-imported-declaration.macho-arm64`
namespace A {
namespace B {
namespace C {
int a = -1;
} // namespace C
} // namespace B
namespace C = B::C;
using namespace B::C;
using B::C::a;
} // namespace A
int main() { return A::a; }