зеркало из https://github.com/microsoft/clang-1.git
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103176 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
04a025e998
Коммит
3c385c28cf
|
@ -55,7 +55,7 @@ public:
|
|||
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.
|
||||
|
|
|
@ -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 @@ private:
|
|||
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 {
|
||||
|
|
|
@ -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
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
|
Загрузка…
Ссылка в новой задаче