fix a bug, id = 4219

bug 4219 is about function
clang::SourceManager::getOrCreateContentCache().
It has an assertion on line 278 in file clang/lib/Basic/SourceManager.cpp

modification:
add this codes:
"


if (!File){



return IgnorePCH;



}




in function PCHReader::ReadSLocEntryRecord()
after line 808 in file clang/lib/Frontend/PCHReader.cpp
so that the codes are like this
"


case pch::SM_SLOC_FILE_ENTRY: {



const FileEntry *File



= PP.getFileManager().getFile(BlobStart, BlobStart + BlobLen);



if (!File){



return IgnorePCH;



}



// FIXME: Error recovery if file cannot be found.



FileID FID = SourceMgr.createFileID(File,



SourceLocation::getFromRawEncoding(Record[1]),



(SrcMgr::CharacteristicKind)Record[2],



ID, Record[0]);



if (Record[3])



const_castSrcMgr::FileInfo&(SourceMgr.getSLocEntry(FID).getFile())



.setHasLineDirectives();








break;



}






|

Rather than listing out the modification like this, can you send a
patch generated with "svn diff"?

-Eli