This implements a PDBASTParser and corresponding logic in SymbolFilePDB to do type lookup by name. This is just a first pass and leaves many aspects of type lookup unimplemented, and just focuses on laying the framework. With this patch, you should be able to lookup basic types by name from a PDB. Full class definitions are not completed yet, we will instead just return a forward declaration of the class. Differential Revision: http://reviews.llvm.org/D18848 Reviewed by: Greg Clayton llvm-svn: 266392
56 lines
1.2 KiB
C++
56 lines
1.2 KiB
C++
//===-- PDBASTParser.h ------------------------------------------*- C++ -*-===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLDB_PLUGINS_SYMBOLFILE_PDB_PDBASTPARSER_H
|
|
#define LLDB_PLUGINS_SYMBOLFILE_PDB_PDBASTPARSER_H
|
|
|
|
#include "lldb/lldb-forward.h"
|
|
|
|
#include "lldb/Symbol/ClangASTImporter.h"
|
|
|
|
namespace clang
|
|
{
|
|
class CharUnits;
|
|
class CXXRecordDecl;
|
|
class FieldDecl;
|
|
class RecordDecl;
|
|
}
|
|
|
|
namespace lldb_private
|
|
{
|
|
class ClangASTContext;
|
|
class CompilerType;
|
|
}
|
|
|
|
namespace llvm
|
|
{
|
|
class PDBSymbol;
|
|
class PDBSymbolData;
|
|
class PDBSymbolTypeBuiltin;
|
|
}
|
|
|
|
class PDBASTParser
|
|
{
|
|
public:
|
|
PDBASTParser(lldb_private::ClangASTContext &ast);
|
|
~PDBASTParser();
|
|
|
|
lldb::TypeSP
|
|
CreateLLDBTypeFromPDBType(const llvm::PDBSymbol &type);
|
|
|
|
private:
|
|
bool
|
|
AddEnumValue(lldb_private::CompilerType enum_type, const llvm::PDBSymbolData &data) const;
|
|
|
|
lldb_private::ClangASTContext &m_ast;
|
|
lldb_private::ClangASTImporter m_ast_importer;
|
|
};
|
|
|
|
#endif // SymbolFileDWARF_DWARFASTParserClang_h_
|