Hi Daniel, Instead of removing that check entirely, it should probably be changed to a null pointer check on the PTHManager* returned by PTHManager::Create(). That method can return NULL for a variety of error conditions.
Ted On Dec 3, 2009, at 1:13 AM, Daniel Dunbar wrote: > Author: ddunbar > Date: Thu Dec 3 03:13:19 2009 > New Revision: 90436 > > URL: http://llvm.org/viewvc/llvm-project?rev=90436&view=rev > Log: > Remove an unnecessary (I believe) exit() on error. > > Modified: > cfe/trunk/lib/Frontend/CompilerInstance.cpp > > Modified: cfe/trunk/lib/Frontend/CompilerInstance.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInstance.cpp?rev=90436&r1=90435&r2=90436&view=diff > > ============================================================================== > --- cfe/trunk/lib/Frontend/CompilerInstance.cpp (original) > +++ cfe/trunk/lib/Frontend/CompilerInstance.cpp Thu Dec 3 03:13:19 2009 > @@ -172,10 +172,6 @@ > if (!PPOpts.TokenCache.empty()) > PTHMgr = PTHManager::Create(PPOpts.TokenCache, Diags); > > - // FIXME: Don't fail like this. > - if (Diags.hasErrorOccurred()) > - exit(1); > - > // Create the Preprocessor. > HeaderSearch *HeaderInfo = new HeaderSearch(FileMgr); > Preprocessor *PP = new Preprocessor(Diags, LangInfo, Target, > > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
