aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Lex/DirectoryLookup.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Lex/DirectoryLookup.h')
-rw-r--r--include/clang/Lex/DirectoryLookup.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/include/clang/Lex/DirectoryLookup.h b/include/clang/Lex/DirectoryLookup.h
new file mode 100644
index 0000000000..a1cfb0a340
--- /dev/null
+++ b/include/clang/Lex/DirectoryLookup.h
@@ -0,0 +1,70 @@
+//===--- DirectoryLookup.h - Info for searching for headers -----*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file was developed by Chris Lattner and is distributed under
+// the University of Illinois Open Source License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines the DirectoryLookup interface.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_LEX_DIRECTORYLOOKUP_H
+#define LLVM_CLANG_LEX_DIRECTORYLOOKUP_H
+
+namespace clang {
+class DirectoryEntry;
+
+/// DirectoryLookup - This class is used to specify the search order for
+/// directories in #include directives.
+class DirectoryLookup {
+public:
+ enum DirType {
+ NormalHeaderDir,
+ SystemHeaderDir,
+ ExternCSystemHeaderDir
+ };
+private:
+ /// Dir - This is the actual directory that we're referring to.
+ ///
+ const DirectoryEntry *Dir;
+
+ /// DirCharacteristic - The type of directory this is, one of the DirType enum
+ /// values.
+ DirType DirCharacteristic : 2;
+
+ /// UserSupplied - True if this is a user-supplied directory.
+ ///
+ bool UserSupplied : 1;
+
+ /// Framework - True if this is a framework directory search-path.
+ ///
+ bool Framework : 1;
+public:
+ DirectoryLookup(const DirectoryEntry *dir, DirType DT, bool isUser,
+ bool isFramework)
+ : Dir(dir), DirCharacteristic(DT), UserSupplied(isUser),
+ Framework(isFramework) {}
+
+ /// getDir - Return the directory that this entry refers to.
+ ///
+ const DirectoryEntry *getDir() const { return Dir; }
+
+ /// DirCharacteristic - The type of directory this is, one of the DirType enum
+ /// values.
+ DirType getDirCharacteristic() const { return DirCharacteristic; }
+
+ /// isUserSupplied - True if this is a user-supplied directory.
+ ///
+ bool isUserSupplied() const { return UserSupplied; }
+
+ /// isFramework - True if this is a framework directory.
+ ///
+ bool isFramework() const { return Framework; }
+};
+
+} // end namespace clang
+
+#endif