aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/lto/pr51992_0.C
blob: f75abd281a6b169f2fe775df3fc54484e1c5c3a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// PR c++/51992
// { dg-lto-do assemble }

template<typename Enum>
class QFlags
{
    int i;
public:
    inline QFlags(Enum f) : i(f) {}
};
class QString {};
class KComponentData;
class KConfig
{
public:
    enum OpenFlag {
        IncludeGlobals = 0x01,
	CascadeConfig = 0x02,
	FullConfig = IncludeGlobals|CascadeConfig
    };
    typedef QFlags<OpenFlag> OpenFlags;
};
template <class T>
class KSharedPtr {};
class KSharedConfig : public KConfig
{
public:
  typedef KSharedPtr<KSharedConfig> Ptr;
    static KSharedConfig::Ptr openConfig(const QString& fileName = QString(),
				         OpenFlags mode = FullConfig,
					 const char *resourceType = "config");
    static KSharedConfig::Ptr openConfig(const KComponentData &componentData,
				         const QString &fileName = QString(),
                                         OpenFlags mode = FullConfig,
					 const char *resourceType = "config");
};
typedef KSharedConfig::Ptr KSharedConfigPtr;
namespace KGlobal
{
    KComponentData &mainComponent();
};
KSharedConfigPtr KSharedConfig::openConfig(const QString& fileName,
                                           OpenFlags flags,
                                           const char *resType)
{
    return openConfig(KGlobal::mainComponent(), fileName, flags, resType);
}
KSharedConfigPtr KSharedConfig::openConfig(const KComponentData &componentData,
                                           const QString& fileName,
                                           OpenFlags flags,
                                           const char *resType)
{
    return KSharedConfigPtr();
}