[RISCV] Simplify usage of SplatPat_simm5_plus1. NFC (#125340)
[llvm-project.git] / clang / test / CodeGenCXX / 2007-01-06-PtrMethodInit.cpp
blob465f55f9f8ecfec9e7f506ad70e5cc1fac100f91
1 // RUN: %clang_cc1 -emit-llvm %s -o - -triple i386-apple-macosx10.7.2
2 // PR1084
4 extern "C"
6 typedef unsigned char PRUint8;
7 typedef unsigned int PRUint32;
9 typedef PRUint32 nsresult;
10 struct nsID
13 typedef nsID nsIID;
14 class nsISupports
17 extern "C++"
19 template < class T > struct nsCOMTypeInfo
21 static const nsIID & GetIID ()
23 static const nsIID i = {};
24 return i;
29 class nsIDOMEvent:public nsISupports
32 class nsIDOMEventListener:public nsISupports
34 public:static const nsIID & GetIID ()
36 static const nsIID i = {};
37 return i;
39 virtual nsresult
40 __attribute__ ((regparm (0), cdecl)) HandleEvent (nsIDOMEvent * event) =
43 class nsIDOMMouseListener:public nsIDOMEventListener
45 public:static const nsIID & GetIID ()
47 static const nsIID iid = {
49 return iid;
51 virtual nsresult
52 __attribute__ ((regparm (0),
53 cdecl)) MouseDown (nsIDOMEvent * aMouseEvent) = 0;
55 typedef
56 typeof (&nsIDOMEventListener::HandleEvent)
57 GenericHandler;
58 struct EventDispatchData
60 PRUint32 message;
61 GenericHandler method;
62 PRUint8 bits;
64 struct EventTypeData
66 const EventDispatchData *events;
67 int numEvents;
68 const nsIID *iid;
70 static const EventDispatchData sMouseEvents[] = {
72 (300 + 2),
73 reinterpret_cast < GenericHandler > (&nsIDOMMouseListener::MouseDown),
74 0x01}
76 static const EventTypeData sEventTypes[] = {
78 sMouseEvents, (sizeof (sMouseEvents) / sizeof (sMouseEvents[0])),
79 &nsCOMTypeInfo < nsIDOMMouseListener >::GetIID ()}