aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Lex/HeaderMap.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-12-17 18:44:09 +0000
committerChris Lattner <sabre@nondot.org>2007-12-17 18:44:09 +0000
commit98751314c4ba596860b574c3d3551030f01ff7d8 (patch)
treebad3c7f5db0e10923e0d6defdbb7ef934df37328 /include/clang/Lex/HeaderMap.h
parent9796915de81f6c8bf20601f85fbc91de39771616 (diff)
Finish hooking up the scaffolding for headermaps. They can now do everything
except resolve lookups. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45111 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/HeaderMap.h')
-rw-r--r--include/clang/Lex/HeaderMap.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/include/clang/Lex/HeaderMap.h b/include/clang/Lex/HeaderMap.h
index dc70d848e0..973cf10a86 100644
--- a/include/clang/Lex/HeaderMap.h
+++ b/include/clang/Lex/HeaderMap.h
@@ -14,8 +14,9 @@
#ifndef LLVM_CLANG_LEX_HEADERMAP_H
#define LLVM_CLANG_LEX_HEADERMAP_H
-#include <string>
-
+namespace llvm {
+ class MemoryBuffer;
+}
namespace clang {
class FileEntry;
class FileManager;
@@ -27,7 +28,16 @@ namespace clang {
class HeaderMap {
HeaderMap(const HeaderMap&); // DO NOT IMPLEMENT
void operator=(const HeaderMap&); // DO NOT IMPLEMENT
+
+ const llvm::MemoryBuffer *FileBuffer;
+ bool NeedsBSwap;
+
+ HeaderMap(const llvm::MemoryBuffer *File, bool BSwap)
+ : FileBuffer(File), NeedsBSwap(BSwap) {
+ }
public:
+ ~HeaderMap();
+
/// HeaderMap::Create - This attempts to load the specified file as a header
/// map. If it doesn't look like a HeaderMap, it gives up and returns null.
static const HeaderMap *Create(const FileEntry *FE);
@@ -38,10 +48,7 @@ public:
FileManager &FM) const;
/// getFileName - Return the filename of the headermap.
- const char *getFileName() const {
- return "";
- }
-
+ const char *getFileName() const;
};
} // end namespace clang.