diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2014-03-01 17:21:22 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2014-03-01 17:21:22 +0000 |
commit | 3d6220d9819be37c5c62574e6509b50c97290f55 (patch) | |
tree | 750aed9c829105920f71720eea6f1da5ef6e369a /clang/lib/Basic/VirtualFileSystem.cpp | |
parent | 075e339373b7c140a085d6eeb47cb53c04d565d8 (diff) | |
download | llvm-3d6220d9819be37c5c62574e6509b50c97290f55.zip llvm-3d6220d9819be37c5c62574e6509b50c97290f55.tar.gz llvm-3d6220d9819be37c5c62574e6509b50c97290f55.tar.bz2 |
Move private classes into anonymous namespaces.
llvm-svn: 202595
Diffstat (limited to 'clang/lib/Basic/VirtualFileSystem.cpp')
-rw-r--r-- | clang/lib/Basic/VirtualFileSystem.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Basic/VirtualFileSystem.cpp b/clang/lib/Basic/VirtualFileSystem.cpp index d4845e6..c32df5b 100644 --- a/clang/lib/Basic/VirtualFileSystem.cpp +++ b/clang/lib/Basic/VirtualFileSystem.cpp @@ -80,6 +80,7 @@ error_code FileSystem::getBufferForFile(const llvm::Twine &Name, // RealFileSystem implementation //===-----------------------------------------------------------------------===/ +namespace { /// \brief Wrapper around a raw file descriptor. class RealFile : public File { int FD; @@ -98,6 +99,7 @@ public: error_code close() LLVM_OVERRIDE; void setName(StringRef Name) LLVM_OVERRIDE; }; +} // end anonymous namespace RealFile::~RealFile() { close(); } ErrorOr<Status> RealFile::status() { @@ -142,6 +144,7 @@ void RealFile::setName(StringRef Name) { S.setName(Name); } +namespace { /// \brief The file system according to your operating system. class RealFileSystem : public FileSystem { public: @@ -149,6 +152,7 @@ public: error_code openFileForRead(const Twine &Path, OwningPtr<File> &Result) LLVM_OVERRIDE; }; +} // end anonymous namespace ErrorOr<Status> RealFileSystem::status(const Twine &Path) { sys::fs::file_status RealStatus; |