diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2015-02-19 20:12:20 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2015-02-19 20:12:20 +0000 |
commit | bd0b651bd249ab766f9c17cf4a9f5ef268f53632 (patch) | |
tree | 3aa21db58320d852de48f1eb76db2cfb32406da6 /clang/lib/Frontend/FrontendActions.cpp | |
parent | dfedfeb298ae491ff6f2f39ab33c01739177d365 (diff) | |
download | llvm-bd0b651bd249ab766f9c17cf4a9f5ef268f53632.zip llvm-bd0b651bd249ab766f9c17cf4a9f5ef268f53632.tar.gz llvm-bd0b651bd249ab766f9c17cf4a9f5ef268f53632.tar.bz2 |
[PCH/Modules] Check that the specific module cache path the PCH was built with, is the same as
the one in the current compiler invocation. If they differ reject the PCH.
This protects against the badness occurring from getting modules loaded from different module caches (see crashes).
rdar://19889860
llvm-svn: 229909
Diffstat (limited to 'clang/lib/Frontend/FrontendActions.cpp')
-rw-r--r-- | clang/lib/Frontend/FrontendActions.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Frontend/FrontendActions.cpp b/clang/lib/Frontend/FrontendActions.cpp index e7ecb29..c8673e5 100644 --- a/clang/lib/Frontend/FrontendActions.cpp +++ b/clang/lib/Frontend/FrontendActions.cpp @@ -501,9 +501,11 @@ namespace { } bool ReadHeaderSearchOptions(const HeaderSearchOptions &HSOpts, + StringRef SpecificModuleCachePath, bool Complain) override { Out.indent(2) << "Header search options:\n"; Out.indent(4) << "System root [-isysroot=]: '" << HSOpts.Sysroot << "'\n"; + Out.indent(4) << "Module Cache: '" << SpecificModuleCachePath << "'\n"; DUMP_BOOLEAN(HSOpts.UseBuiltinIncludes, "Use builtin include directories [-nobuiltininc]"); DUMP_BOOLEAN(HSOpts.UseStandardSystemIncludes, |