xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenCXX/debug-info-friend.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang -emit-llvm -S -g %s -o - | FileCheck %s
2*f4a2713aSLionel Sambuc 
3*f4a2713aSLionel Sambuc class MyFriend;
4*f4a2713aSLionel Sambuc 
5*f4a2713aSLionel Sambuc class SomeClass {
6*f4a2713aSLionel Sambuc   friend class MyFriend;
7*f4a2713aSLionel Sambuc   typedef int SomeType;
8*f4a2713aSLionel Sambuc };
9*f4a2713aSLionel Sambuc 
10*f4a2713aSLionel Sambuc SomeClass *x;
11*f4a2713aSLionel Sambuc 
12*f4a2713aSLionel Sambuc struct MyFriend {
funcMyFriend13*f4a2713aSLionel Sambuc   static void func(SomeClass::SomeType) {
14*f4a2713aSLionel Sambuc   }
15*f4a2713aSLionel Sambuc };
16*f4a2713aSLionel Sambuc 
17*f4a2713aSLionel Sambuc // Emitting debug info for friends unnecessarily bloats debug info without any
18*f4a2713aSLionel Sambuc // known benefit or debugger feature that requires it. Re-enable this is a
19*f4a2713aSLionel Sambuc // use-case appears.
20*f4a2713aSLionel Sambuc // CHECK-NOT: DW_TAG_friend
21