[cfe-commits] r103176 - in /cfe/trunk: include/clang/AST/Decl.h include/clang/AST/TypeLoc.h lib/AST/Decl.cpp
John McCall
rjmccall at apple.com
Thu May 6 02:25:57 PDT 2010
Author: rjmccall
Date: Thu May 6 04:25:57 2010
New Revision: 103176
URL: http://llvm.org/viewvc/llvm-project?rev=103176&view=rev
Log:
Push TypeSourceInfo::getTypeLoc() into a header file so that it's
inlineable. That header file has to be TypeLoc.h, which means that
TypeLoc.h needs to depend on Decl.h because TypeSourceInfo doesn't
have its own header. That could be remedied, though.
Modified:
cfe/trunk/include/clang/AST/Decl.h
cfe/trunk/include/clang/AST/TypeLoc.h
cfe/trunk/lib/AST/Decl.cpp
Modified: cfe/trunk/include/clang/AST/Decl.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Decl.h?rev=103176&r1=103175&r2=103176&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Decl.h (original)
+++ cfe/trunk/include/clang/AST/Decl.h Thu May 6 04:25:57 2010
@@ -55,7 +55,7 @@
QualType getType() const { return Ty; }
/// \brief Return the TypeLoc wrapper for the type source info.
- TypeLoc getTypeLoc() const;
+ TypeLoc getTypeLoc() const; // implemented in TypeLoc.h
};
/// TranslationUnitDecl - The top declaration context.
Modified: cfe/trunk/include/clang/AST/TypeLoc.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/TypeLoc.h?rev=103176&r1=103175&r2=103176&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/TypeLoc.h (original)
+++ cfe/trunk/include/clang/AST/TypeLoc.h Thu May 6 04:25:57 2010
@@ -15,6 +15,7 @@
#define LLVM_CLANG_AST_TYPELOC_H
#include "clang/AST/Type.h"
+#include "clang/AST/Decl.h"
#include "clang/AST/TemplateBase.h"
#include "clang/Basic/Specifiers.h"
@@ -140,6 +141,11 @@
static SourceRange getSourceRangeImpl(TypeLoc TL);
};
+/// \brief Return the TypeLoc for a type source info.
+inline TypeLoc TypeSourceInfo::getTypeLoc() const {
+ return TypeLoc(Ty, (void*)(this + 1));
+}
+
/// \brief Wrapper of type source information for a type with
/// no direct quqlaifiers.
class UnqualTypeLoc : public TypeLoc {
Modified: cfe/trunk/lib/AST/Decl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Decl.cpp?rev=103176&r1=103175&r2=103176&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Decl.cpp (original)
+++ cfe/trunk/lib/AST/Decl.cpp Thu May 6 04:25:57 2010
@@ -28,11 +28,6 @@
using namespace clang;
-/// \brief Return the TypeLoc wrapper for the type source info.
-TypeLoc TypeSourceInfo::getTypeLoc() const {
- return TypeLoc(Ty, (void*)(this + 1));
-}
-
//===----------------------------------------------------------------------===//
// NamedDecl Implementation
//===----------------------------------------------------------------------===//
More information about the cfe-commits
mailing list