aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/FileManager.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-01-28 00:27:31 +0000
committerTed Kremenek <kremenek@apple.com>2009-01-28 00:27:31 +0000
commit5c04bd81edc00cb201d04e80ae45be50c4cf83db (patch)
tree88956b790048cb510ba52df6ca7afc3735ad66f0 /clang/lib/Basic/FileManager.cpp
parentb3e09314018150abba7f065a6dda92d8567119a8 (diff)
downloadllvm-5c04bd81edc00cb201d04e80ae45be50c4cf83db.zip
llvm-5c04bd81edc00cb201d04e80ae45be50c4cf83db.tar.gz
llvm-5c04bd81edc00cb201d04e80ae45be50c4cf83db.tar.bz2
Add a some comments to designate Windows-specific/Unix-specific code. No functionality change.
llvm-svn: 63157
Diffstat (limited to 'clang/lib/Basic/FileManager.cpp')
-rw-r--r--clang/lib/Basic/FileManager.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/lib/Basic/FileManager.cpp b/clang/lib/Basic/FileManager.cpp
index cfc08ed..3f7c4fd 100644
--- a/clang/lib/Basic/FileManager.cpp
+++ b/clang/lib/Basic/FileManager.cpp
@@ -22,6 +22,7 @@
#include "llvm/Bitcode/Serialize.h"
#include "llvm/Bitcode/Deserialize.h"
#include "llvm/Support/Streams.h"
+#include "llvm/Support/Allocator.h"
#include "llvm/Config/config.h"
using namespace clang;
@@ -36,6 +37,10 @@ using namespace clang;
/// represent a dir name that doesn't exist on the disk.
#define NON_EXISTENT_DIR reinterpret_cast<DirectoryEntry*>((intptr_t)-1)
+//===----------------------------------------------------------------------===//
+// Windows.
+//===----------------------------------------------------------------------===//
+
#ifdef LLVM_ON_WIN32
#define IS_DIR_SEPARATOR_CHAR(x) ((x) == '/' || (x) == '\\')
@@ -87,6 +92,10 @@ public:
size_t size() { return UniqueFiles.size(); }
};
+//===----------------------------------------------------------------------===//
+// Unix-like Systems.
+//===----------------------------------------------------------------------===//
+
#else
#define IS_DIR_SEPARATOR_CHAR(x) ((x) == '/')
@@ -122,6 +131,9 @@ public:
#endif
+//===----------------------------------------------------------------------===//
+// Common logic.
+//===----------------------------------------------------------------------===//
FileManager::FileManager() : UniqueDirs(*new UniqueDirContainer),
UniqueFiles(*new UniqueFileContainer),