diff options
Diffstat (limited to 'swift-init-CachedVFile.patch')
-rw-r--r-- | swift-init-CachedVFile.patch | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/swift-init-CachedVFile.patch b/swift-init-CachedVFile.patch deleted file mode 100644 index 37e38edee65c..000000000000 --- a/swift-init-CachedVFile.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 09cbffb3e4ed5c4ef8069d273e2d34309abcd2e4 Mon Sep 17 00:00:00 2001 -From: Mishal Shah <mishal_shah@apple.com> -Date: Fri, 14 Oct 2016 15:29:18 -0700 -Subject: [PATCH] Initialize CachedVFile with nullptr - ---- - include/swift/Basic/SourceManager.h | 2 +- - lib/Basic/SourceLoc.cpp | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/include/swift/Basic/SourceManager.h b/include/swift/Basic/SourceManager.h -index 1072b8b..e5149f1 100644 ---- a/include/swift/Basic/SourceManager.h -+++ b/include/swift/Basic/SourceManager.h -@@ -40,7 +40,7 @@ class SourceManager { - int LineOffset; - }; - std::map<const char *, VirtualFile> VirtualFiles; -- mutable std::pair<const char *, const VirtualFile*> CachedVFile = {}; -+ mutable std::pair<const char *, const VirtualFile*> CachedVFile = {nullptr, nullptr}; - - public: - llvm::SourceMgr &getLLVMSourceMgr() { -diff --git a/lib/Basic/SourceLoc.cpp b/lib/Basic/SourceLoc.cpp -index 9bc484c..b6e0873 100644 ---- a/lib/Basic/SourceLoc.cpp -+++ b/lib/Basic/SourceLoc.cpp -@@ -82,7 +82,7 @@ bool SourceManager::openVirtualFile(SourceLoc loc, StringRef name, - - CharSourceRange range = CharSourceRange(*this, loc, end); - VirtualFiles[end.Value.getPointer()] = { range, name, lineOffset }; -- CachedVFile = {}; -+ CachedVFile = {nullptr, nullptr}; - return true; - } - -@@ -99,7 +99,7 @@ void SourceManager::closeVirtualFile(SourceLoc end) { - #endif - return; - } -- CachedVFile = {}; -+ CachedVFile = {nullptr, nullptr}; - - CharSourceRange oldRange = virtualFile->Range; - virtualFile->Range = CharSourceRange(*this, virtualFile->Range.getStart(), |