File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -437,6 +437,15 @@ that should never be entered if the program invariants hold:
437437      llvm_unreachable("X should be Foo or Bar here"); 
438438  } 
439439
440+ Additionally, ``reportFatalInternalError `` can be used to report invariant
441+ violations even in builds that do not enable assertions:
442+ 
443+ .. code-block :: c++ 
444+ 
445+   if (VerifyFooAnalysis && !Foo.verify()) {
446+     reportFatalInternalError("Analysis 'foo' not preserved");
447+   }
448+ 
440449Recoverable Errors
441450^^^^^^^^^^^^^^^^^^ 
442451
@@ -452,9 +461,9 @@ recovery.
452461   While it would be ideal to use this error handling scheme throughout
453462   LLVM, there are places where this hasn't been practical to apply. In
454463   situations where you absolutely must emit a non-programmatic error and
455-    the ``Error `` model isn't workable you can call ``report_fatal_error ``,
456-    which will call installed error handlers, print a message, and abort  the
457-    program. The use of `report_fatal_error ` in this case is discouraged.
464+    the ``Error `` model isn't workable you can call ``reportFatalUsageError ``,
465+    which will call installed error handlers, print a message, and exit  the
466+    program. The use of `reportFatalUsageError ` in this case is discouraged.
458467
459468Recoverable errors are modeled using LLVM's ``Error `` scheme. This scheme
460469represents errors using function return values, similar to classic C integer
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments