forked from OSchip/llvm-project
				
			handle fatal errors, rely on warnings to point out missing cases.
llvm-svn: 63913
This commit is contained in:
		
							parent
							
								
									2c4cf2752d
								
							
						
					
					
						commit
						b05f49e7fd
					
				| 
						 | 
				
			
			@ -29,10 +29,11 @@ void PathDiagnosticClient::HandleDiagnostic(Diagnostic::Level DiagLevel,
 | 
			
		|||
  
 | 
			
		||||
  const char *LevelStr;
 | 
			
		||||
  switch (DiagLevel) {
 | 
			
		||||
  default: assert(0 && "Unknown diagnostic type!");
 | 
			
		||||
  case Diagnostic::Ignored: assert(0 && "Invalid diagnostic type");
 | 
			
		||||
  case Diagnostic::Note:    LevelStr = "note: "; break;
 | 
			
		||||
  case Diagnostic::Warning: LevelStr = "warning: "; break;
 | 
			
		||||
  case Diagnostic::Error:   LevelStr = "error: "; break;
 | 
			
		||||
  case Diagnostic::Fatal:   LevelStr = "fatal error: "; break;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  llvm::SmallString<100> StrC;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -122,10 +122,11 @@ void TextDiagnosticPrinter::HandleDiagnostic(Diagnostic::Level Level,
 | 
			
		|||
  }
 | 
			
		||||
  
 | 
			
		||||
  switch (Level) {
 | 
			
		||||
  default: assert(0 && "Unknown diagnostic type!");
 | 
			
		||||
  case Diagnostic::Ignored: assert(0 && "Invalid diagnostic type");
 | 
			
		||||
  case Diagnostic::Note:    OS << "note: "; break;
 | 
			
		||||
  case Diagnostic::Warning: OS << "warning: "; break;
 | 
			
		||||
  case Diagnostic::Error:   OS << "error: "; break;
 | 
			
		||||
  case Diagnostic::Fatal:   OS << "fatal error: "; break;
 | 
			
		||||
  }
 | 
			
		||||
  
 | 
			
		||||
  llvm::SmallString<100> OutStr;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue