summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Convert inline asm source ranges into clang SourceRanges and print them with ↵Benjamin Kramer2011-10-161-2/+11
| | | | | | | | | | | | | | the instantiated note. t.c:2:7: error: invalid operand for instruction asm("movl 0(%rax), 0(%edx)"); ^ <inline asm>:1:16: note: instantiated into assembly here movl 0(%rax), 0(%edx) ^~~~~~~ 1 error generated. llvm-svn: 142131
* Fix a bug in LowerV2I64Splat, which generated a BUILD_VECTOR for which there wasNadav Rotem2011-10-162-3/+9
| | | | | | no pattern. llvm-svn: 142130
* I fixed this with r142127; these notes now make sense even w/o the caret.Chandler Carruth2011-10-161-1/+0
| | | | llvm-svn: 142129
* Hoist the logic I added to compute the macro name into a helperChandler Carruth2011-10-161-16/+30
| | | | | | function. No functionality changed. llvm-svn: 142128
* Now that macro expansion notes are real notes and go through the sameChandler Carruth2011-10-164-44/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | formatting as any other diagnostic, they will be properly line wrapped and otherwise pretty printed. Let's take advantage of that and the new factoring to add some helpful information to them (much like template backtrace notes and other notes): the name of the macro whose expansion is being noted. This makes a world of difference if caret diagnostics are disabled, making the expansion notes actually useful in this case. It also helps ensure that in edge cases the information the user needs is present. Consider: % nl -ba t5.cc 1 #define M(x, y, z) \ 2 y 3 4 M( 5 1, 6 2, 7 3); We now produce: % ./bin/clang -fsyntax-only t5.cc t5.cc:6:3: error: expected unqualified-id 2, ^ t5.cc:2:3: note: expanded from macro: M y ^ 1 error generated. Without the added information in the note, the name of the macro being expanded would never be shown. This also deletes a FIXME to use the diagnostic formatting. It's not yet clear to me that we *can* do this reasonably, and the production of this message was my primary goal here anyways. I'd love any comments or suggestions on improving these notes, their wording, etc. Currently, I need to make them provide more helpful information in the presence of a token-pasting buffer, and I'm pondering adding something along the lines of "expanded from argument N of macro: ...". llvm-svn: 142127
* Install the PNG file as well. PR4780.Bill Wendling2011-10-161-0/+2
| | | | llvm-svn: 142125
* Update tutorial to reflect the current APIs. Also correct a small omission inBill Wendling2011-10-166-215/+240
| | | | | | | LangImpl6.html (it needed to defined the 'binary :' operator). PR9052 llvm-svn: 142123
* Add X86 BZHI instruction as well as BMI2 feature detection.Craig Topper2011-10-1612-65/+101
| | | | llvm-svn: 142122
* Fix the original bug in our diagnostic printing that got me started onChandler Carruth2011-10-161-29/+12
| | | | | | | | | | | | | this long quest: actually use the note printing machinery for each macro expansion note rather than a hacky version of it. This will colorize and format the notes the same as any other. There is still some stuff to fix here, but it's one step closer. No test case changes because currently we don't do anything differently that I can FileCheck for -- I don't really want to try matching the color escape codes... Suggestions for how to test this are welcome. =] llvm-svn: 142121
* Now that the structure of this is more reasonably laid out, fix a longChandler Carruth2011-10-163-33/+55
| | | | | | | | | | | | | | | standing deficiency: we were providing no macro backtrace information whenever caret diagnostics were turned off. This sinks the logic for suppressing the code snippet and caret to the code that actually prints tho code snippet and caret. Along the way, clean up the naming of functions, remove some now fixed FIXMEs, and generally improve the wording and logic of this process. Add a test case exerecising this functionality. It is notable that the resulting messages are extremely low quality. I'm working on a follow-up patch that should address this and have left a FIXME in the test case. llvm-svn: 142120
* Add a prefix to the existing test to prepare for more tests of otherChandler Carruth2011-10-161-14/+15
| | | | | | backtrace behavior. llvm-svn: 142119
* Fold two run lines into a single logical one, and move them down belowChandler Carruth2011-10-161-4/+5
| | | | | | | | the important code in this test to make the test more stable. Now adding further tests won't shift the line numbers occuring in the diagnostic output. llvm-svn: 142118
* Add X86 INVPCID instruction. Add 32/64-bit predicates to INVEPT, INVVPID, ↵Craig Topper2011-10-165-16/+31
| | | | | | VMREAD, and VMWRITE to remove hack from X86RecognizableInstr. llvm-svn: 142117
* Rename this test to a more general name in preparation for adding moreChandler Carruth2011-10-161-6/+6
| | | | | | tests to it to cover more of the macro bactrace functionality. llvm-svn: 142116
* Enable CREATE_SUBDIRS for a performance win, because there are a lot of ↵Bill Wendling2011-10-161-1/+1
| | | | | | files being generated. llvm-svn: 142113
* Enable CREATE_SUBDIRS for a performance win, because there are a lot of ↵Bill Wendling2011-10-161-1/+1
| | | | | | files being generated. llvm-svn: 142112
* Add flags on Thumb2 indexed stores paralleling the flags on the indexed loads.Cameron Zwarich2011-10-161-1/+3
| | | | | | | These missing flags show up as errors when running -verify-coalescing on test-suite. llvm-svn: 142111
* Fix an obvious typo found when looking at nearby code.Cameron Zwarich2011-10-161-1/+1
| | | | llvm-svn: 142110
* Add proper doxyments to the entry point routine, and remove a dead parameter.Chandler Carruth2011-10-162-4/+14
| | | | llvm-svn: 142109
* remove the dead 'ShowLine' argument from SMDiagnostic.Chris Lattner2011-10-163-26/+16
| | | | llvm-svn: 142108
* Make SMDiagnostic a little more sane. Instead of passing around ↵Chris Lattner2011-10-1611-88/+107
| | | | | | | | note/warning/error as a string, pass it around as an enum. llvm-svn: 142107
* Enhance llvm::SourceMgr to support diagnostic ranges, the same way clang ↵Chris Lattner2011-10-1620-79/+188
| | | | | | | | | | | | | | | 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. llvm-svn: 142106
* Add X86 BEXTR instruction. This instruction uses VEX.vvvv to encode Operand ↵Craig Topper2011-10-168-24/+109
| | | | | | 3 instead of Operand 2 so needs special casing in the disassembler and code emitter. Ultimately, should pass this information from tablegen llvm-svn: 142105
* Persist the TextDiagnostic object across multiple diagnostics as long asChandler Carruth2011-10-164-59/+38
| | | | | | | | | the SourceManager doesn't change, and the source files don't change. This greatly simplifies the interfaces and interactions. The lifetime of the TextDiagnostic object forms the 'session' over which we attempt to condense and deduplicate information in diagnostics. llvm-svn: 142104
* CMake: Introduce LLVM_CLANG_SOURCE_DIR, "tools/clang" by default. Clang will ↵NAKAMURA Takumi2011-10-162-2/+10
| | | | | | not be built if LLVM_CLANG_SOURCE_DIR="" or ${LLVM_CLANG_SOURCE_DIR}/CMakeLists.txt is not found. llvm-svn: 142103
* autoconf: Introduce --with-clang-srcdir, to build out-of-tree clang as ↵NAKAMURA Takumi2011-10-164-7/+49
| | | | | | tools/clang on tools/Makefile. llvm-svn: 142102
* Makefile.rules: Let OPTIONAL_PARALLEL_DIRS accept out-of-tree absolute path.NAKAMURA Takumi2011-10-161-7/+14
| | | | llvm-svn: 142101
* test/Makefile: Inspect $(PROJ_OBJ_ROOT)/tools/clang/Makefile instead of ↵NAKAMURA Takumi2011-10-161-1/+1
| | | | | | $(PROJ_SRC_ROOT)/tools/clang for "check-all". llvm-svn: 142100
* Add a helper script to create branches and tag release candidates.Bill Wendling2011-10-161-0/+95
| | | | llvm-svn: 142098
* Add a script that helps merge changes into a release branch.Bill Wendling2011-10-161-0/+72
| | | | llvm-svn: 142097
* Add X86 feature detection support for BMI instructions. Added new cpuid ↵Craig Topper2011-10-163-18/+107
| | | | | | function for accessing leafs with sub leafs specified in ECX. Also added code to keep track of the max cpuid level supported in both basic and extended leaves and qualified the existing cpuid calls and the new call to leaf 7. llvm-svn: 142089
* Clean up the names of all the TextDiagnostic methods (and even a staticChandler Carruth2011-10-153-38/+40
| | | | | | | function) to agree with the coding conventions, and in one case have a bit more information in it. llvm-svn: 142088
* Move two functions out of the public interface that shouldn't have everChandler Carruth2011-10-152-238/+215
| | | | | | | | | | been there. Also delete their redundant doxyments in favor of those in the source file. I'm putting the doxyments for private and static helpers into the implementation file, and only the public interface doxyments into the header. If folks have strong opinions about this type of split, feel free to chime in, I'm happy to re-organize. llvm-svn: 142087
* Graduate the TextDiagnostic interface to its own header and source file,Chandler Carruth2011-10-154-1155/+1278
| | | | | | | | | | making it accessible to anyone from the Frontend library. Still a good bit of cleanup to do here, but its a good milestone. This ensures that *all* of the functionality needed to implement the DiagnosticConsumer is exposed via the generic interface in some form. No sneaky re-use of static functions. llvm-svn: 142086
* Move the message printing to a class-static function so that it can beChandler Carruth2011-10-151-28/+45
| | | | | | part of the TextDiagnostic interface without requiring a full instance. llvm-svn: 142085
* Move the diagnostic level printing into a class static helper. This willChandler Carruth2011-10-151-31/+38
| | | | | | | allow the TextDiagnosticPrinter to continue using it even if TextDiagnostic is implemented in a separate file. llvm-svn: 142084
* Rationalize the last bit of "arbitrary" state that is carried betweenChandler Carruth2011-10-152-10/+24
| | | | | | | | | | | | | diagnostics to control suppression of redundant information. It now follows the same model as all the other state, and has a bit more clear semantics. This is making the duality of the state a bit annoying, and I've added a FIXME to resolve it. The problem is that I need to lift the TextDiagnostic up into an externally visible layer before that can happen. llvm-svn: 142083
* Add support for X86 blsr, blsmsk, and blsi instructions. Required extra work ↵Craig Topper2011-10-157-25/+180
| | | | | | because these are the first VEX encoded instructions to use the reg field as an opcode extension. llvm-svn: 142082
* The CELL backend cannot select patterns for vector trunc-store and shl on ↵Nadav Rotem2011-10-151-0/+9
| | | | | | v2i64; CellSPU/shift_ops.ll fails when promoting elements. llvm-svn: 142081
* ARM cannot select a pattern for trunc-store v4i8; /ARM/vrev.ll fails when ↵Nadav Rotem2011-10-151-0/+2
| | | | | | promoting elements. llvm-svn: 142080
* Fix extra whitespace in comment.Nick Lewycky2011-10-151-1/+1
| | | | llvm-svn: 142079
* Avoid duplicate unavailbility diagnostics in objc++.Fariborz Jahanian2011-10-152-1/+13
| | | | | | // rdar://10268422 llvm-svn: 142078
* Let this test pass even if 'int' is somewhere in its directory path.Nico Weber2011-10-151-1/+1
| | | | | | | | | | | On my machine, grep matched: ; ModuleID = '/Volumes/MacintoshHD2/src/chrome-git/src/third_party/llvm/test/Linker/2011-08-18-unique-debug-type.ll' !9 = metadata !{i32 720932, null, metadata !"int", null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] Explicitly filter out the ModuleID line. llvm-svn: 142077
* Place static initializers on linux into the ".text.startup" section, so the ↵Benjamin Kramer2011-10-151-0/+4
| | | | | | | | linker can group them together for performance. This only has an effect with fairly new binutils (2.21.51 or later). Other ELF targets probably want this as well, but on BSDs binutils is usually old so it doesn't matter. llvm-svn: 142076
* obj-c++: allow the getter/setter to return/take parametersFariborz Jahanian2011-10-153-4/+20
| | | | | | by reference. // rdar://10188258 llvm-svn: 142075
* Internals manual: eliminate mention of System libraryPeter Collingbourne2011-10-151-8/+6
| | | | llvm-svn: 142074
* SmallVector -> arrayBenjamin Kramer2011-10-151-3/+3
| | | | llvm-svn: 142073
* Replace vectors with arrays.Benjamin Kramer2011-10-153-69/+73
| | | | llvm-svn: 142072
* Neither 'Warning' nor 'NonNote' was a good name for this location...Chandler Carruth2011-10-152-14/+15
| | | | | | | It's the last include-stack-root we tried to walk up. Use a better name and better doxyments for it. llvm-svn: 142071
* Nuke a bunch of FIXMEs that are now fixed. =] Also, remove the now-deadChandler Carruth2011-10-151-8/+3
| | | | | | | | | TextDiagnosticPrinter argument to the TextDiagnostic helper class. This cements the proper ordering of things: TextDiagnostic is now a viable stand-alone class for emitting pretty-printed textual diagnostics to a terminal. llvm-svn: 142070
OpenPOWER on IntegriCloud