aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/FileEntry.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2020-10-16 16:37:14 -0400
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2020-10-28 16:38:32 -0400
commit23ed570af1cc165afea1b70a533a4a39d6656501 (patch)
treef0488740a2cd6b1ef6dd0acf9495eb7c818d200e /clang/lib/Basic/FileEntry.cpp
parent49cddb90f6455d850fcee7d7cd5b414531e3422f (diff)
downloadllvm-23ed570af1cc165afea1b70a533a4a39d6656501.zip
llvm-23ed570af1cc165afea1b70a533a4a39d6656501.tar.gz
llvm-23ed570af1cc165afea1b70a533a4a39d6656501.tar.bz2
Split out llvm/Support/FileSystem/UniqueID.h and clang/Basic/FileEntry.h, NFC
Split `FileEntry` and `FileEntryRef` out into a new file `clang/Basic/FileEntry.h`. This allows current users of a forward-declared `FileEntry` to transition to `FileEntryRef` without adding more includers of `FileManager.h`. Also split `UniqueID` out to llvm/Support/FileSystem/UniqueID.h, so `FileEntry.h` doesn't need to include all of `FileSystem.h` for just that type. Differential Revision: https://reviews.llvm.org/D89761
Diffstat (limited to 'clang/lib/Basic/FileEntry.cpp')
-rw-r--r--clang/lib/Basic/FileEntry.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/clang/lib/Basic/FileEntry.cpp b/clang/lib/Basic/FileEntry.cpp
new file mode 100644
index 0000000..29218c7
--- /dev/null
+++ b/clang/lib/Basic/FileEntry.cpp
@@ -0,0 +1,23 @@
+//===- FileEntry.cpp - File references --------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+/// \file
+/// Defines implementation for clang::FileEntry and clang::FileEntryRef.
+//
+//===----------------------------------------------------------------------===//
+
+#include "clang/Basic/FileEntry.h"
+#include "llvm/Support/VirtualFileSystem.h"
+
+using namespace clang;
+
+FileEntry::FileEntry() : UniqueID(0, 0), IsNamedPipe(false), IsValid(false) {}
+
+FileEntry::~FileEntry() = default;
+
+void FileEntry::closeFile() const { File.reset(); }