1 //===--- ProgramImpl.h - Internal Program implementation---------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // Internal implementation for the Program class
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_CLANG_INDEX_PROGRAMIMPL_H
15 #define LLVM_CLANG_INDEX_PROGRAMIMPL_H
17 #include "clang/Index/Entity.h"
18 #include "llvm/ADT/StringSet.h"
27 typedef llvm::FoldingSet
<Entity
> EntitySetTy
;
28 typedef llvm::StringMapEntry
<char> IdEntryTy
;
31 llvm::FoldingSet
<Entity
> Entities
;
32 llvm::StringSet
<> Idents
;
33 llvm::BumpPtrAllocator BumpAlloc
;
35 ProgramImpl(const ProgramImpl
&); // do not implement
36 ProgramImpl
&operator=(const ProgramImpl
&); // do not implement
41 llvm::FoldingSet
<Entity
> &getEntities() { return Entities
; }
42 llvm::StringSet
<> &getIdents() { return Idents
; }
44 void *Allocate(unsigned Size
, unsigned Align
= 8) {
45 return BumpAlloc
.Allocate(Size
, Align
);