aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Lex/HeaderMap.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-12-17 21:06:11 +0000
committerChris Lattner <sabre@nondot.org>2007-12-17 21:06:11 +0000
commit1adbf6349d4701771a814542008386ad39e3d614 (patch)
tree0f89e42766ab289c1b6769b4dee508c7178c3328 /include/clang/Lex/HeaderMap.h
parentc569249ca0ab755ac79d8cbbfcb2bcae19743624 (diff)
implement enough helper functions to successfully dump out the
contents of the header map. Look ma, no assumptions about input data here (aka, corrupt header maps can't crash the compiler - crazy thought). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45122 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/HeaderMap.h')
-rw-r--r--include/clang/Lex/HeaderMap.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/clang/Lex/HeaderMap.h b/include/clang/Lex/HeaderMap.h
index 973cf10a86..3bc0acf70f 100644
--- a/include/clang/Lex/HeaderMap.h
+++ b/include/clang/Lex/HeaderMap.h
@@ -20,6 +20,8 @@ namespace llvm {
namespace clang {
class FileEntry;
class FileManager;
+ struct HMapBucket;
+ struct HMapHeader;
/// This class represents an Apple concept known as a 'header map'. To the
/// #include file resolution process, it basically acts like a directory of
@@ -49,6 +51,15 @@ public:
/// getFileName - Return the filename of the headermap.
const char *getFileName() const;
+
+ /// dump - Print the contents of this headermap to stderr.
+ void dump() const;
+
+private:
+ unsigned getEndianAdjustedWord(unsigned X) const;
+ const HMapHeader &getHeader() const;
+ HMapBucket getBucket(unsigned BucketNo) const;
+ const char *getString(unsigned StrTabIdx) const;
};
} // end namespace clang.