bolt/deps/llvm-18.1.8/llvm/test/tools/dsymutil/Inputs/accel-imported-declaration.cpp

23 lines
597 B
C++
Raw Normal View History

2025-02-14 19:21:04 +01:00
// 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; }