diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-03-08 23:35:24 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-03-08 23:35:24 +0000 |
commit | 299a4a967b02c9f0d0d94ad8560e3ced893f9116 (patch) | |
tree | 977a7dbe9a61fe1329a0e7c014442ec963b3aa18 /lib/Frontend/ASTUnit.cpp | |
parent | cf333339615da345c2ed6e873d94a501810d9f3f (diff) |
Add 'OverridenFilesKeepOriginalName' field in SourceManager which if true the SourceManager
should report the original file name for contents of files that were overriden by other files,
otherwise it should report the name of the new file. Default is true.
Also add similar field in PreprocessorOptions and pass similar parameter in ASTUnit::LoadFromCommandLine.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127289 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/ASTUnit.cpp')
-rw-r--r-- | lib/Frontend/ASTUnit.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp index 9252c6a7a0..5e534b3d57 100644 --- a/lib/Frontend/ASTUnit.cpp +++ b/lib/Frontend/ASTUnit.cpp @@ -1576,6 +1576,7 @@ ASTUnit *ASTUnit::LoadFromCommandLine(const char **ArgBegin, bool CaptureDiagnostics, RemappedFile *RemappedFiles, unsigned NumRemappedFiles, + bool RemappedFilesKeepOriginalName, bool PrecompilePreamble, bool CompleteTranslationUnit, bool CacheCodeCompletionResults, @@ -1658,6 +1659,8 @@ ASTUnit *ASTUnit::LoadFromCommandLine(const char **ArgBegin, CI->getPreprocessorOpts().addRemappedFile(RemappedFiles[I].first, fname); } } + CI->getPreprocessorOpts().RemappedFilesKeepOriginalName = + RemappedFilesKeepOriginalName; // Override the resources path. CI->getHeaderSearchOpts().ResourceDir = ResourceFilesPath; |