1 // PR c++/51992
2 // { dg-lto-do assemble }
3 
4 template<typename Enum>
5 class QFlags
6 {
7     int i;
8 public:
QFlags(Enum f)9     inline QFlags(Enum f) : i(f) {}
10 };
11 class QString {};
12 class KComponentData;
13 class KConfig
14 {
15 public:
16     enum OpenFlag {
17         IncludeGlobals = 0x01,
18 	CascadeConfig = 0x02,
19 	FullConfig = IncludeGlobals|CascadeConfig
20     };
21     typedef QFlags<OpenFlag> OpenFlags;
22 };
23 template <class T>
24 class KSharedPtr {};
25 class KSharedConfig : public KConfig
26 {
27 public:
28   typedef KSharedPtr<KSharedConfig> Ptr;
29     static KSharedConfig::Ptr openConfig(const QString& fileName = QString(),
30 				         OpenFlags mode = FullConfig,
31 					 const char *resourceType = "config");
32     static KSharedConfig::Ptr openConfig(const KComponentData &componentData,
33 				         const QString &fileName = QString(),
34                                          OpenFlags mode = FullConfig,
35 					 const char *resourceType = "config");
36 };
37 typedef KSharedConfig::Ptr KSharedConfigPtr;
38 namespace KGlobal
39 {
40     KComponentData &mainComponent();
41 };
openConfig(const QString & fileName,OpenFlags flags,const char * resType)42 KSharedConfigPtr KSharedConfig::openConfig(const QString& fileName,
43                                            OpenFlags flags,
44                                            const char *resType)
45 {
46     return openConfig(KGlobal::mainComponent(), fileName, flags, resType);
47 }
openConfig(const KComponentData & componentData,const QString & fileName,OpenFlags flags,const char * resType)48 KSharedConfigPtr KSharedConfig::openConfig(const KComponentData &componentData,
49                                            const QString& fileName,
50                                            OpenFlags flags,
51                                            const char *resType)
52 {
53     return KSharedConfigPtr();
54 }
55