Add LLVM runtime checks to build path
[clang/acc.git] / lib / Index / ProgramImpl.h
blob52f153f1dcd7863b8fae8e265d7f433db358163f
1 //===--- ProgramImpl.h - Internal Program implementation---------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
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"
20 namespace clang {
22 namespace idx {
23 class EntityListener;
25 class ProgramImpl {
26 public:
27 typedef llvm::FoldingSet<Entity> EntitySetTy;
28 typedef llvm::StringMapEntry<char> IdEntryTy;
30 private:
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
38 public:
39 ProgramImpl() { }
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);
49 } // namespace idx
51 } // namespace clang
53 #endif