[cfe-commits] r116506 - in /cfe/trunk: include/clang/Serialization/ASTDeserializationListener.h lib/Frontend/FrontendAction.cpp lib/Serialization/ASTCommon.cpp
Argyrios Kyrtzidis
akyrtzi at gmail.com
Thu Oct 14 13:14:29 PDT 2010
Author: akirtzidis
Date: Thu Oct 14 15:14:28 2010
New Revision: 116506
URL: http://llvm.org/viewvc/llvm-project?rev=116506&view=rev
Log:
Give a default implementation for ASTDeserializationListener's methods, no functionality change.
Modified:
cfe/trunk/include/clang/Serialization/ASTDeserializationListener.h
cfe/trunk/lib/Frontend/FrontendAction.cpp
cfe/trunk/lib/Serialization/ASTCommon.cpp
Modified: cfe/trunk/include/clang/Serialization/ASTDeserializationListener.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Serialization/ASTDeserializationListener.h?rev=116506&r1=116505&r2=116506&view=diff
==============================================================================
--- cfe/trunk/include/clang/Serialization/ASTDeserializationListener.h (original)
+++ cfe/trunk/include/clang/Serialization/ASTDeserializationListener.h Thu Oct 14 15:14:28 2010
@@ -26,26 +26,26 @@
class ASTDeserializationListener {
protected:
- virtual ~ASTDeserializationListener() {}
+ virtual ~ASTDeserializationListener();
public:
/// \brief Tell the listener about the reader.
- virtual void SetReader(ASTReader *Reader) = 0;
+ virtual void SetReader(ASTReader *Reader) { }
/// \brief An identifier was deserialized from the AST file.
virtual void IdentifierRead(serialization::IdentID ID,
- IdentifierInfo *II) = 0;
+ IdentifierInfo *II) { }
/// \brief A type was deserialized from the AST file. The ID here has the
/// qualifier bits already removed, and T is guaranteed to be locally
/// unqualified.
- virtual void TypeRead(serialization::TypeIdx Idx, QualType T) = 0;
+ virtual void TypeRead(serialization::TypeIdx Idx, QualType T) { }
/// \brief A decl was deserialized from the AST file.
- virtual void DeclRead(serialization::DeclID ID, const Decl *D) = 0;
+ virtual void DeclRead(serialization::DeclID ID, const Decl *D) { }
/// \brief A selector was read from the AST file.
- virtual void SelectorRead(serialization::SelectorID iD, Selector Sel) = 0;
+ virtual void SelectorRead(serialization::SelectorID iD, Selector Sel) { }
/// \brief A macro definition was read from the AST file.
virtual void MacroDefinitionRead(serialization::MacroID,
- MacroDefinition *MD) = 0;
+ MacroDefinition *MD) { }
};
}
Modified: cfe/trunk/lib/Frontend/FrontendAction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/FrontendAction.cpp?rev=116506&r1=116505&r2=116506&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/FrontendAction.cpp (original)
+++ cfe/trunk/lib/Frontend/FrontendAction.cpp Thu Oct 14 15:14:28 2010
@@ -42,13 +42,6 @@
if (Previous)
Previous->DeclRead(ID, D);
}
-
- virtual void SetReader(ASTReader *Reader) {}
- virtual void IdentifierRead(serialization::IdentID ID, IdentifierInfo *II) {}
- virtual void TypeRead(serialization::TypeIdx Idx, QualType T) {}
- virtual void SelectorRead(serialization::SelectorID iD, Selector Sel) {}
- virtual void MacroDefinitionRead(serialization::MacroID,
- MacroDefinition *MD) {}
};
/// \brief Checks deserialized declarations and emits error if a name
@@ -77,13 +70,6 @@
if (Previous)
Previous->DeclRead(ID, D);
}
-
- virtual void SetReader(ASTReader *Reader) {}
- virtual void IdentifierRead(serialization::IdentID ID, IdentifierInfo *II) {}
- virtual void TypeRead(serialization::TypeIdx Idx, QualType T) {}
- virtual void SelectorRead(serialization::SelectorID iD, Selector Sel) {}
- virtual void MacroDefinitionRead(serialization::MacroID,
- MacroDefinition *MD) {}
};
} // end anonymous namespace
Modified: cfe/trunk/lib/Serialization/ASTCommon.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTCommon.cpp?rev=116506&r1=116505&r2=116506&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTCommon.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTCommon.cpp Thu Oct 14 15:14:28 2010
@@ -12,11 +12,15 @@
//===----------------------------------------------------------------------===//
#include "ASTCommon.h"
+#include "clang/Serialization/ASTDeserializationListener.h"
#include "clang/Basic/IdentifierTable.h"
#include "llvm/ADT/StringExtras.h"
using namespace clang;
+// Give ASTDeserializationListener's VTable a home.
+ASTDeserializationListener::~ASTDeserializationListener() { }
+
serialization::TypeIdx
serialization::TypeIdxFromBuiltin(const BuiltinType *BT) {
unsigned ID = 0;
More information about the cfe-commits
mailing list