diff options
author | Hartmut Kaiser <hartmut.kaiser@gmail.com> | 2007-10-17 15:00:17 +0000 |
---|---|---|
committer | Hartmut Kaiser <hartmut.kaiser@gmail.com> | 2007-10-17 15:00:17 +0000 |
commit | 7b66000bdfc2684351fb03208e672f23012ed569 (patch) | |
tree | 8a4b4f935667f2dbd63ee75172db3689c75ad3a5 /Driver/SerializationTest.cpp | |
parent | 338128bea14fe0d24442a4a34986e53b551e1d06 (diff) |
Updated VC++ build system.
Silenced some VC++ warnings.
Had to rephrase a partial specialization of the IntrospectionTrait struct in SerializationTest.cpp, please review.
Added a compiler specific workaround in IdentifierTable.h. Is that the way to fix this kind of issues?
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43074 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/SerializationTest.cpp')
-rw-r--r-- | Driver/SerializationTest.cpp | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/Driver/SerializationTest.cpp b/Driver/SerializationTest.cpp index a18bd222f8..1901591420 100644 --- a/Driver/SerializationTest.cpp +++ b/Driver/SerializationTest.cpp @@ -196,29 +196,32 @@ IntrospectionTrait<short>::Flags : public IntrospectionPrimitivesFlags {}; template<> -struct IntrospectionTrait<clang::IdentifierInfo>::Flags { - enum { isPod = false, // Cannot copy via memcpy. Must use copy-ctor. - hasUniqueInstances = true, // Two pointers with different - // addreses point to objects - // that are not equal to each other. - hasUniqueReferences = true // Two (non-temporary) pointers - // will point to distinct instances. +struct IntrospectionTrait<clang::IdentifierInfo> { + + struct Flags { + enum { isPod = false, // Cannot copy via memcpy. Must use copy-ctor. + hasUniqueInstances = true, // Two pointers with different + // addreses point to objects + // that are not equal to each other. + hasUniqueReferences = true // Two (non-temporary) pointers + // will point to distinct instances. + }; + }; + + template<typename Introspector> + struct Ops { + static void Introspect(clang::IdentifierInfo& X, Introspector& I) { + // I(X.getTokenID()); + I(X.getBuiltinID(),9); // FIXME: do 9 bit specialization. + // I(X.getObjCKeywordID()); + I(X.hasMacroDefinition()); + I(X.isExtensionToken()); + I(X.isPoisoned()); + I(X.isOtherTargetMacro()); + I(X.isCPlusPlusOperatorKeyword()); + I(X.isNonPortableBuiltin()); + } }; -}; - -template<> template<typename Introspector> -struct IntrospectionTrait<clang::IdentifierInfo>::Ops<Introspector> { - static void Introspect(clang::IdentifierInfo& X, Introspector& I) { -// I(X.getTokenID()); - I(X.getBuiltinID(),9); // FIXME: do 9 bit specialization. -// I(X.getObjCKeywordID()); - I(X.hasMacroDefinition()); - I(X.isExtensionToken()); - I(X.isPoisoned()); - I(X.isOtherTargetMacro()); - I(X.isCPlusPlusOperatorKeyword()); - I(X.isNonPortableBuiltin()); - } }; template<> template<> |