From b1c86492f9a9bef01a4567408c22f961bbd604fe Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Sat, 5 Mar 2011 01:03:53 +0000 Subject: Currently we can only remap a file by creating a MemoryBuffer and replacing the file contents with it. Allow remapping a file by specifying another filename whose contents should be loaded if the original file gets loaded. This allows to override files without having to create & load buffers in advance. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127052 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Frontend/CacheTokens.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Frontend/CacheTokens.cpp') diff --git a/lib/Frontend/CacheTokens.cpp b/lib/Frontend/CacheTokens.cpp index 50182247fc..06a1fd2983 100644 --- a/lib/Frontend/CacheTokens.cpp +++ b/lib/Frontend/CacheTokens.cpp @@ -473,7 +473,7 @@ void PTHWriter::GeneratePTH(const std::string &MainFile) { for (SourceManager::fileinfo_iterator I = SM.fileinfo_begin(), E = SM.fileinfo_end(); I != E; ++I) { const SrcMgr::ContentCache &C = *I->second; - const FileEntry *FE = C.Entry; + const FileEntry *FE = C.OrigEntry; // FIXME: Handle files with non-absolute paths. if (llvm::sys::path::is_relative(FE->getName())) -- cgit v1.2.3-18-g5258