Mercurial > hg > CbC > CbC_llvm
changeset 127:2ce56a727a15
fix PPDirectives.cpp
author | mir3636 |
---|---|
date | Tue, 05 Dec 2017 00:04:34 +0900 |
parents | c4cc77a799c9 |
children | c347d3398279 |
files | tools/clang/lib/Frontend/FrontendOptions.cpp tools/clang/lib/Lex/PPDirectives.cpp |
diffstat | 2 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/tools/clang/lib/Frontend/FrontendOptions.cpp Mon Dec 04 21:20:52 2017 +0900 +++ b/tools/clang/lib/Frontend/FrontendOptions.cpp Tue Dec 05 00:04:34 2017 +0900 @@ -31,7 +31,7 @@ .Case("cu", InputKind::CUDA) .Cases("ll", "bc", InputKind::LLVM_IR) #ifndef noCbC - .Case("cbc", IK_C) + .Case("cbc", InputKind::C) #endif .Default(InputKind::Unknown); }
--- a/tools/clang/lib/Lex/PPDirectives.cpp Mon Dec 04 21:20:52 2017 +0900 +++ b/tools/clang/lib/Lex/PPDirectives.cpp Tue Dec 05 00:04:34 2017 +0900 @@ -2916,15 +2916,16 @@ Filename = StringRef(Name, Len); bool isAngled = true; // '<' header name '>' const DirectoryLookup *CurDir; + bool IsMapped = false; ModuleMap::KnownHeader SuggestedModule; const FileEntry *File = LookupFile(Loc, Filename, isAngled, LookupFrom, nullptr, CurDir, nullptr, nullptr, - &SuggestedModule); + &SuggestedModule, &IsMapped); if (File == 0) { Diag(FilenameTok, diag::err_pp_file_not_found) << Filename; // setjmp.h was not found } SrcMgr::CharacteristicKind FileCharacter = std::max(HeaderInfo.getFileDirFlavor(File), SourceMgr.getFileCharacteristic(Loc)); - if (!HeaderInfo.ShouldEnterIncludeFile(*this, File, false, SuggestedModule.getModule())) { + if (!HeaderInfo.ShouldEnterIncludeFile(*this, File, false, false, SuggestedModule.getModule())) { return false; }