//===--------------------------------------------------------------------===//
/// createFileID - Create a new FileID that represents the specified file
- /// being #included from the specified IncludePosition. This returns 0 on
- /// error and translates NULL into standard input.
+ /// being #included from the specified IncludePosition. This translates NULL
+ /// into standard input.
/// PreallocateID should be non-zero to specify which pre-allocated,
/// lazily computed source location is being filled in by this operation.
FileID createFileID(const FileEntry *SourceFile, SourceLocation IncludePos,
// Look up the file, create a File ID for it.
FileID FID = SourceMgr.createFileID(File, FilenameTok.getLocation(),
FileCharacter);
- if (FID.isInvalid()) {
- Diag(FilenameTok, diag::err_pp_file_not_found) << Filename;
- return;
- }
+ assert(!FID.isInvalid() && "Expected valid file ID");
// Finally, if all is good, enter the new file!
EnterSourceFile(FID, CurDir, FilenameTok.getLocation());