File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -260,8 +260,11 @@ void HeaderIncludesCallback::FileSkipped(const FileEntryRef &SkippedFile, const
260260
261261void HeaderIncludesJSONCallback::EndOfMainFile () {
262262 OptionalFileEntryRef FE = SM.getFileEntryRefForID (SM.getMainFileID ());
263- SmallString<256 > MainFile (FE->getName ());
264- SM.getFileManager ().makeAbsolutePath (MainFile);
263+ SmallString<256 > MainFile;
264+ if (FE) {
265+ MainFile += FE->getName ();
266+ SM.getFileManager ().makeAbsolutePath (MainFile);
267+ }
265268
266269 std::string Str;
267270 llvm::raw_string_ostream OS (Str);
Original file line number Diff line number Diff line change 1+ // RUN: %clang_cc1 -header-include-format=json -header-include-filtering=only-direct-system -header-include-file %t.txt -emit-module -x c -fmodules -fmodule-name=X %s -o /dev/null
2+ module X {}
You can’t perform that action at this time.
0 commit comments