Clean up ConstantRange a bit:
[llvm.git] / test / FrontendC++ / 2007-01-06-PtrMethodInit.cpp
blobf87c8d888fce4648a335cca2678503ec6a62c252
1 // RUN: %llvmgxx %s -emit-llvm -S -o -
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 ()
27 class nsIDOMEvent:public nsISupports
30 class nsIDOMEventListener:public nsISupports
32 public:static const nsIID & GetIID ()
35 virtual nsresult
36 __attribute__ ((regparm (0), cdecl)) HandleEvent (nsIDOMEvent * event) =
39 class nsIDOMMouseListener:public nsIDOMEventListener
41 public:static const nsIID & GetIID ()
43 static const nsIID iid = {
46 virtual nsresult
47 __attribute__ ((regparm (0),
48 cdecl)) MouseDown (nsIDOMEvent * aMouseEvent) = 0;
50 typedef
51 typeof (&nsIDOMEventListener::HandleEvent)
52 GenericHandler;
53 struct EventDispatchData
55 PRUint32 message;
56 GenericHandler method;
57 PRUint8 bits;
59 struct EventTypeData
61 const EventDispatchData *events;
62 int numEvents;
63 const nsIID *iid;
65 static const EventDispatchData sMouseEvents[] = {
67 (300 + 2),
68 reinterpret_cast < GenericHandler > (&nsIDOMMouseListener::MouseDown),
69 0x01}
71 static const EventTypeData sEventTypes[] = {
73 sMouseEvents, (sizeof (sMouseEvents) / sizeof (sMouseEvents[0])),
74 &nsCOMTypeInfo < nsIDOMMouseListener >::GetIID ()}