forked from OSchip/llvm-project
				
			Fix Twine corruption problem with diagnostics.
This fixes the autobuilders I broke with a recent patch. Thanks echristo and dblaikie for beating me with a clue stick. llvm-svn: 220918
This commit is contained in:
		
							parent
							
								
									2206b48d6d
								
							
						
					
					
						commit
						77a5a5fcda
					
				| 
						 | 
				
			
			@ -740,8 +740,7 @@ bool SampleProfileLoader::doInitialization(Module &M) {
 | 
			
		|||
  if (std::error_code EC =
 | 
			
		||||
          SampleProfileReader::create(Filename, Reader, M.getContext())) {
 | 
			
		||||
    std::string Msg = "Could not open profile: " + EC.message();
 | 
			
		||||
    DiagnosticInfoSampleProfile Diag(Filename.data(), Msg);
 | 
			
		||||
    M.getContext().diagnose(Diag);
 | 
			
		||||
    M.getContext().diagnose(DiagnosticInfoSampleProfile(Filename.data(), Msg));
 | 
			
		||||
    return false;
 | 
			
		||||
  }
 | 
			
		||||
  ProfileIsValid = (Reader->read() == sampleprof_error::success);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue