summaryrefslogtreecommitdiff
path: root/include/llvm/Support/SourceMgr.h
Commit message (Collapse)AuthorAge
* Make SourceMgr::PrintMessage() testable and add unit testsDmitri Gribenko2013-09-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191558 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix size_t -> uint warnings with MSVC 64-bit buildMatt Arsenault2013-07-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186736 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ArrayRef constructor from None, and do the cleanups that this ↵Dmitri Gribenko2013-05-05
| | | | | | | | | constructor enables Patch by Robert Wilhelm. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181138 91177308-0d34-0410-b5e6-96231b3b80d8
* Add basic fix-its to SMDiagnostic.Jordan Rose2013-01-10
| | | | | | | | | | | | | Like Clang's FixItHint, SMFixIt represents an insertion, replacement, or removal of source text. One or more fix-its can be emitted as part of a diagnostic, and will be printed below the source range line to show the user how they can fix their code. Currently, the only client of SMFixIt is clang-tblgen; thus, the tests for this behavior live in clang/test/TableGen/tg-fixits.td. If/when SMFixIt is adopted within LLVM itself, those tests should be moved to the LLVM suite. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172086 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix include guards so they exactly match file names.Jakub Staszak2013-01-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172025 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for passing -main-file-name all the way through toEric Christopher2012-12-18
| | | | | | | | the assembler. Part of PR14624 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170390 91177308-0d34-0410-b5e6-96231b3b80d8
* Sort the #include lines for the include/... tree with the script.Chandler Carruth2012-12-03
| | | | | | | | | | AKA: Recompile *ALL* the source code! This one went much better. No manual edits here. I spot-checked for silliness and grep-checked for really broken edits and everything seemed good. It all still compiles. Yell if you see something that looks goofy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169133 91177308-0d34-0410-b5e6-96231b3b80d8
* Use LLVM_DELETED_FUNCTION for copy constructors and copy assignment ↵Craig Topper2012-09-16
| | | | | | operators that aren't implemented. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164006 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bunch of -Wdocumentation warnings.Dmitri Gribenko2012-08-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162446 91177308-0d34-0410-b5e6-96231b3b80d8
* fix warnings when compiling with -WshadowNick Kledzik2012-05-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157061 91177308-0d34-0410-b5e6-96231b3b80d8
* reapply my patch, with a fix for an off-by-one error. Turned out to be a lotChris Lattner2012-05-05
| | | | | | | of work for a drive-by fix :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156246 91177308-0d34-0410-b5e6-96231b3b80d8
* revert my patches, which are causing problems.Chris Lattner2012-05-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156245 91177308-0d34-0410-b5e6-96231b3b80d8
* add missing header <shame>Chris Lattner2012-05-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156244 91177308-0d34-0410-b5e6-96231b3b80d8
* SourceMgr: Colorize diagnostics.Benjamin Kramer2012-04-18
| | | | | | Same color scheme as clang uses. The colors are only enabled if the output is a tty. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155035 91177308-0d34-0410-b5e6-96231b3b80d8
* PR11143: Save the old diagnostic handler and call it when munging ↵Benjamin Kramer2011-10-16
| | | | | | | | diagnostics for #line directives. This reenables proper inline asm diagnostics in clang git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142132 91177308-0d34-0410-b5e6-96231b3b80d8
* remove the dead 'ShowLine' argument from SMDiagnostic.Chris Lattner2011-10-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142108 91177308-0d34-0410-b5e6-96231b3b80d8
* Make SMDiagnostic a little more sane. Instead of passing around ↵Chris Lattner2011-10-16
| | | | | | | | | note/warning/error as a string, pass it around as an enum. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142107 91177308-0d34-0410-b5e6-96231b3b80d8
* Enhance llvm::SourceMgr to support diagnostic ranges, the same way clang ↵Chris Lattner2011-10-16
| | | | | | | | | | | | | | | | | does. Enhance the X86 asmparser to produce ranges in the one case that was annoying me, for example: test.s:10:15: error: invalid operand for instruction movl 0(%rax), 0(%edx) ^~~~~~~ It should be straight-forward to enhance filecheck, tblgen, and/or the .ll parser to use ranges where appropriate if someone is interested. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142106 91177308-0d34-0410-b5e6-96231b3b80d8
* Finish supporting cpp #file/line comments in assembler for error messages. SoKevin Enderby2011-10-12
| | | | | | | | | | for cpp pre-processed assembly we give correct filename and line numbers when reporting errors in assembly files when using clang and -integrated-as on .s files. rdar://8998895 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141814 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new -d option to tblgen. It writes a make(1)-style dependency file.Joerg Sonnenberger2011-06-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132395 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the showline argument from the SMDiagnostic constructorDan Gohman2011-03-01
| | | | | | | which constructs a diagnostic with no line to show. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126787 91177308-0d34-0410-b5e6-96231b3b80d8
* add a missing const qualifier for consistency.Chris Lattner2011-03-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126742 91177308-0d34-0410-b5e6-96231b3b80d8
* now that AsmPrinter::EmitInlineAsm is factored right, we can eliminate theChris Lattner2010-11-17
| | | | | | | | | cookie argument to the SourceMgr diagnostic stuff. This cleanly separates LLVMContext's inlineasm handler from the sourcemgr error handling definition, increasing type safety and cleaning things up. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119486 91177308-0d34-0410-b5e6-96231b3b80d8
* Push twines deeper into SourceMgr's error handling methods.Benjamin Kramer2010-09-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114847 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't construct a std::string with a literal "".Dan Gohman2010-08-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110180 91177308-0d34-0410-b5e6-96231b3b80d8
* this accessor doesn't need to copy the string.Chris Lattner2010-04-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100542 91177308-0d34-0410-b5e6-96231b3b80d8
* enhance SMDiagnostic to also maintain a pointer to the SourceMgr.Chris Lattner2010-04-06
| | | | | | | | Add a simplified constructor for clients that don't have locations like "file not found" errors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100538 91177308-0d34-0410-b5e6-96231b3b80d8
* give the SourceMgr object a cookie.Chris Lattner2010-04-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100504 91177308-0d34-0410-b5e6-96231b3b80d8
* Give llvm::SourceMgr the ability to have a client-specifiedChris Lattner2010-04-06
| | | | | | | diagnostic handler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100503 91177308-0d34-0410-b5e6-96231b3b80d8
* add a comment.Chris Lattner2010-04-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100490 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some of the memcheck errors found in the JIT unittests.Jeffrey Yasskin2010-02-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95856 91177308-0d34-0410-b5e6-96231b3b80d8
* Make SMDiagnostic::Print a const method.Mikhail Glushenkov2010-01-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94672 91177308-0d34-0410-b5e6-96231b3b80d8
* Trailing whitespace.Mikhail Glushenkov2010-01-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94671 91177308-0d34-0410-b5e6-96231b3b80d8
* Split SMLoc out in its own header so that it canSean Callanan2010-01-18
| | | | | | | be used independently of SourceMgr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93780 91177308-0d34-0410-b5e6-96231b3b80d8
* SourceMgr: Add ShowLine argument to PrintMessage, to allow suppressing the ↵Daniel Dunbar2009-11-22
| | | | | | source line output. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89627 91177308-0d34-0410-b5e6-96231b3b80d8
* add a trivial line # cache to SourceMgr to make repeated queries toChris Lattner2009-08-11
| | | | | | | | FindLineNumber much faster when in sequence. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78693 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the default copy-ctor, copy-assignment, and destructor.Dan Gohman2009-08-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78670 91177308-0d34-0410-b5e6-96231b3b80d8
* switch the .ll parser to use SourceMgr.Chris Lattner2009-07-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74735 91177308-0d34-0410-b5e6-96231b3b80d8
* add an explicit class for holding llvm::SourceMgr diagnostics and useChris Lattner2009-07-02
| | | | | | | | | | | | | | | | | it to print them. This gives us column numbers in the diag line. Before: t.s:4: error: unexpected token in argument list mov %eax %edx ^ now: t.s:4:11: error: unexpected token in argument list mov %eax %edx ^ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74732 91177308-0d34-0410-b5e6-96231b3b80d8
* Normalize SourceMgr messages.Daniel Dunbar2009-06-30
| | | | | | | | | | | | | - Don't print "Parsing" in front of every message. - Take additional "type" argument which is prepended to the message (with ": ") if given. - Update clients to print errors (warnings) as: <filename>:<line number>: error(warning): ... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74489 91177308-0d34-0410-b5e6-96231b3b80d8
* Add SMLoc::isValid method.Daniel Dunbar2009-06-29
| | | | | | | - To support using SMLoc as a sentinel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74474 91177308-0d34-0410-b5e6-96231b3b80d8
* rename SourceMgr::PrintError to PrintMessage.Chris Lattner2009-06-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73861 91177308-0d34-0410-b5e6-96231b3b80d8
* move include searching logic from TGLexer to SourceMgr.Chris Lattner2009-06-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73845 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename TGSourceMgr -> SourceMgr.Chris Lattner2009-06-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73844 91177308-0d34-0410-b5e6-96231b3b80d8
* rename TGLoc -> SMLoc.Chris Lattner2009-06-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73843 91177308-0d34-0410-b5e6-96231b3b80d8
* move TGSourceMgr class out of TableGen into libsupport.Chris Lattner2009-06-21
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73842 91177308-0d34-0410-b5e6-96231b3b80d8