[LLVMbugs] [Bug 698] NEW: Clean up LLVM error and warning output

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri Jan 20 08:29:58 PST 2006


http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=698

           Summary: Clean up LLVM error and warning output
           Product: libraries
           Version: 1.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Support Libraries
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: rspencer at x10sys.com


LLVM's error and warning messages are somewhat haphazard currently. There is no
consistency across tools or even within a tool. Some messages are preceded by
the tool's name, others aren't. Warnings sometimes start with "WARNING" other
times with "warning". Sometimes the source file and line is printed, sometimes
not. There are other discrepancies as well.

I would like to propose that we standardize LLVM's error nad warning output
similar to GCC's (so other tools parsing the output can work with llvm). The
output formats should be:

Errors:    <source>: error: <message> <location>
Warnings:  <source>: warning: <message> <location>

The fields are defined as:
<source> - in the case of an assembler, compiler or other tool that is reading a 
           human readable file, the source consists of the file name, a colon,
           and the line number. Otherwise the source is the name of the tool
           that produced the warning or error.
<message>- the text of the error or warning message
<location>-in debug mode this prints "at <file>:<line>" which identifies the 
           the LLVM source file and line for ease of tracking down where the
           error message came from. In release mode, it prints nothing.

It is suggested that an Error class be added to the Support library that would
replace the inclusion of <iostream> and provide two ostreams subclasses (one for
errors and one for warnings). These streams would manage the common components
of the error messages and facilitate a simple conversion of existing code to use
the Error class.

Note that consistent use of such a feature would also make it possible to divert
all error and warning messages to alternate destinations should we need to do so
in the future.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




More information about the llvm-bugs mailing list