diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2020-10-16 16:37:14 -0400 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2020-10-28 16:38:32 -0400 |
commit | 23ed570af1cc165afea1b70a533a4a39d6656501 (patch) | |
tree | f0488740a2cd6b1ef6dd0acf9495eb7c818d200e /clang/lib/Basic/FileEntry.cpp | |
parent | 49cddb90f6455d850fcee7d7cd5b414531e3422f (diff) | |
download | llvm-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.cpp | 23 |
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(); } |