summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Duncan owns dragonegg too, it's all his fault :)Chris Lattner2011-09-231-1/+1
| | | | llvm-svn: 140430
* Verify that terminators follow non-terminators.Jakob Stoklund Olesen2011-09-232-0/+16
| | | | | | This exposes a -segmented-stacks bug. llvm-svn: 140429
* PR10998: It is not legal to sink an instruction past the terminator of a ↵Eli Friedman2011-09-232-1/+52
| | | | | | block; make sure we don't do that. llvm-svn: 140428
* Fix a crash-on-invalid.Matt Beaumont-Gay2011-09-232-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The token stream was not getting properly reset when leaving ParseLexedMethodDef in some error cases. In the testcase, that caused later accesses to the token stream to touch memory which had been freed as we finished parsing the class definition. Major hat-tip to AddressSanitizer for helping pinpoint the use-after-free, including the allocation and deallocation points: ==21510== ERROR: AddressSanitizer heap-use-after-free on address 0x7feb3de87848 at pc 0x249f4e2 bp 0x7fff15a89df0 sp 0x7fff15a89ce0 READ of size 1 at 0x7feb3de87848 thread T0 #0 0x249f4e2 clang::TokenLexer::Lex() #1 0x1c834a0 clang::Parser::ConsumeToken() #2 0x1c7dc0f clang::Parser::ParseDeclarationOrFunctionDefinition() #3 0x1c7e16b clang::Parser::ParseDeclarationOrFunctionDefinition() <snip> 0x7feb3de87848 is located 1992 bytes inside of 3816-byte region [0x7feb3de87080,0x7feb3de87f68) freed by thread T0 here: #0 0x3a22c19 free #1 0x1d136a1 clang::Parser::LexedMethod::~LexedMethod() #2 0x1cef528 clang::Parser::DeallocateParsedClasses() #3 0x1cef676 clang::Parser::PopParsingClass() #4 0x1cea094 clang::Parser::ParseCXXMemberSpecification() #5 0x1ce7ae5 clang::Parser::ParseClassSpecifier() #6 0x1cfe588 clang::Parser::ParseDeclarationSpecifiers() #7 0x1c7dbe8 clang::Parser::ParseDeclarationOrFunctionDefinition() #8 0x1c7e16b clang::Parser::ParseDeclarationOrFunctionDefinition() <snip> previously allocated by thread T0 here: #0 0x3a2302d realloc #1 0x39d7c97 llvm::SmallVectorBase::grow_pod() #2 0x1ac588e llvm::SmallVectorImpl<>::push_back() #3 0x1d12d8b clang::Parser::ConsumeAndStoreUntil() #4 0x1c9c24d clang::Parser::ConsumeAndStoreUntil() #5 0x1d12c1e clang::Parser::ConsumeAndStoreUntil() #6 0x1c9c24d clang::Parser::ConsumeAndStoreUntil() #7 0x1d10042 clang::Parser::ParseCXXInlineMethodDef() #8 0x1cec51a clang::Parser::ParseCXXClassMemberDeclaration() #9 0x1ce9de5 clang::Parser::ParseCXXMemberSpecification() #10 0x1ce7ae5 clang::Parser::ParseClassSpecifier() #11 0x1cfe588 clang::Parser::ParseDeclarationSpecifiers() #12 0x1c7dbe8 clang::Parser::ParseDeclarationOrFunctionDefinition() #13 0x1c7e16b clang::Parser::ParseDeclarationOrFunctionDefinition() <snip> llvm-svn: 140427
* Teach the Thumb2 AsmParser to accept pre-indexed loads/stores with an offset ↵Owen Anderson2011-09-232-1/+3
| | | | | | of #-0. llvm-svn: 140426
* Also match negative offsets for addrmode3 and addrmode5.Jakob Stoklund Olesen2011-09-232-2/+20
| | | | | | | | Math is hard, and isScaledConstantInRange() always returned false for negative constants. It was doing unsigned division of negative numbers before casting back to signed. llvm-svn: 140425
* Fix up assertion a bit moreDouglas Gregor2011-09-231-1/+1
| | | | llvm-svn: 140424
* Fix incorrect disassembly test.Owen Anderson2011-09-231-1/+1
| | | | llvm-svn: 140423
* Add more fixed bits to USAT16 encoding to filter out incorrect decodings.Owen Anderson2011-09-231-2/+2
| | | | llvm-svn: 140422
* Add a simple regression test for 'target stop-hook list' with no target ↵Johnny Chen2011-09-231-0/+5
| | | | | | | | specified. It should not crash lldb. llvm-svn: 140421
* Post-index loads/stores in still need to print the post-indexed immediate, ↵Owen Anderson2011-09-233-11/+18
| | | | | | even if it's zero, to distinguish them from non-post-indexed instructions. llvm-svn: 140420
* Added a test for problems caused when Clang errantly makes the line range ↵Jim Ingham2011-09-232-1/+9
| | | | | | | | | | for one line too long, so that the jump from the line above the bad line to the line after ends up in the middle of the bad line instead. Added a workaround to lldb to just continue to the end if we find ourselves stopped in the middle of some other line. llvm-svn: 140419
* Add a (bool)end_to_end parameter, default true, to the ↵Johnny Chen2011-09-232-13/+44
| | | | | | | | | | | Target::Remove/Disable/EnableALLWatchpointLocations() methods. If passed as false, it signifies that only the debugger side is affected. Modify Target::DeleteCurrentProcess() to use DisableAllWatchpointLocations(false) to disable the watchpoint locations, instead of removing them between process instances. llvm-svn: 140418
* in CommandObjectTargetStopHookList::Execute, if we don't have a target,Jason Molenda2011-09-231-0/+1
| | | | | | | | | | | | return before we try to dereference the target later in the function. Currently, % lldb -x (lldb) target stop-hook list crashes because of this. llvm-svn: 140417
* If stepping takes us from the line range we were stepping through into the ↵Jim Ingham2011-09-231-9/+33
| | | | | | MIDDLE of another line, then continue till we get to the real beginning of a line. This is mostly to work around debug information bugs. llvm-svn: 140416
* Reapply r140412 (Thumb2 reg-reg loads cannot target SP or PC), with invalid ↵Owen Anderson2011-09-232-3/+3
| | | | | | testcases updated. llvm-svn: 140415
* Driver: Explicitly include <unistd.h>, libstdc++'s <map> pulls it in, libc++ ↵Benjamin Kramer2011-09-231-0/+6
| | | | | | | | doesn't. Also, on windows, chdir seems to live in <direct.h>. llvm-svn: 140414
* Revert r140412. This affects more instructions than intended.Owen Anderson2011-09-231-1/+1
| | | | llvm-svn: 140413
* Thumb2 register-shifted-register loads cannot target the PC or the SP.Owen Anderson2011-09-231-1/+1
| | | | llvm-svn: 140412
* Add DiagGroups to a couple of warnings.Matt Beaumont-Gay2011-09-233-10/+11
| | | | llvm-svn: 140411
* Driver: Test case that was supposed to go with previous commit.Daniel Dunbar2011-09-231-0/+3
| | | | llvm-svn: 140410
* Driver: Add a --working-directory option which can be used to cause the compilerDaniel Dunbar2011-09-233-0/+16
| | | | | | | | | | to operate "as if" in a certain working directory. - For now, we just implement this by changing the actual working directory, but eventually we would want to handle this transparently. This is useful to avoid an extra exec() pair in some situations, and will be something we would want to support for more flexibility in using the Clang libraries. llvm-svn: 140409
* Add a test triple. Who knew that all the world wasn't darwin?Douglas Gregor2011-09-231-1/+1
| | | | llvm-svn: 140408
* Removing a bunch of dead returns/breaks after llvm_unreachables.David Blaikie2011-09-2361-125/+5
| | | | llvm-svn: 140407
* Don't propagate the 'availability' attribute through declarationDouglas Gregor2011-09-232-2/+17
| | | | | | | | merging for overrides. One might want to make a method's availability in a superclass different from that of its subclass. Fixes <rdar://problem/10166223>. llvm-svn: 140406
* Add a new warning to -Wliteral-conversion to catch cases where a string literalRichard Trieu2011-09-234-6/+41
| | | | | | | | | | | | | | is cast to a boolean. An exception has been made for string literals in logical expressions to allow the common case of use in assert statements. bool x; x = "hi"; // Warn here void foo(bool x); foo("hi"); // Warn here assert(0 && "error"); assert("error); // Warn here llvm-svn: 140405
* Clean up parsing the category names in interfaces slightly, usingDouglas Gregor2011-09-232-10/+13
| | | | | | | MatchRHSPunctuation appropriately and giving a useful source location for the complaint about attributes being added to a category. llvm-svn: 140404
* Move immutable map canonization out of the removeDeadBindings loop (via ↵Anna Zaks2011-09-231-4/+9
| | | | | | using ImmutableMapRef). Gives ~2% speedup. llvm-svn: 140403
* Add getTreeFactory() to ImmutableSet to allow construction of ↵Anna Zaks2011-09-231-0/+4
| | | | | | ImmutableSetRef from an ImmutableSet object. llvm-svn: 140402
* Implement N32/64 calling convention. Patch by Liu.Akira Hatanaka2011-09-231-1/+54
| | | | llvm-svn: 140401
* When checking for weak vtables, check whether the actual definition ofDouglas Gregor2011-09-232-1/+31
| | | | | | | | the key function is inline, rather than the original declaration. Perhaps FunctionDecl::isInlined() is poorly named. Fixes <rdar://problem/9979458>. llvm-svn: 140400
* objc-gc: Fix a corner case where clang fails to generate GC Fariborz Jahanian2011-09-232-1/+33
| | | | | | write barrier with captured pointer to object. // rdar://10150823 llvm-svn: 140399
* Add test cases for watchpoint list, enable, disable, and delete commands.Johnny Chen2011-09-233-0/+337
| | | | llvm-svn: 140398
* Make FGR64RegisterClass available if target is Mips64.Akira Hatanaka2011-09-231-1/+6
| | | | llvm-svn: 140397
* A second try to make the TestStopHookMechanism.py more robust after recent ↵Johnny Chen2011-09-231-6/+2
| | | | | | changes. llvm-svn: 140396
* Add definitions of 64-bit register files. Add code for returning Mips64's ↵Akira Hatanaka2011-09-232-9/+81
| | | | | | | | sets of callee-saved registers and reserved registers. llvm-svn: 140395
* PTX: Fix parameter order bugJustin Holewinski2011-09-232-8/+8
| | | | llvm-svn: 140394
* Add a simple test case for 'help watchpoint', 'help watchpt-id', and 'help ↵Johnny Chen2011-09-231-0/+9
| | | | | | watchpt-id-list'. llvm-svn: 140393
* The "Stop Hooks" anchors have been removed from the stop-hook output.Johnny Chen2011-09-231-1/+1
| | | | | | Update the test case to fix test suite failure. llvm-svn: 140392
* Fix a couple of 80 column violations.Wesley Peck2011-09-232-2/+3
| | | | | | patch contributed by Jia Liu! llvm-svn: 140391
* PTX: Cleanup unused code in PTXMachineFunctionInfoJustin Holewinski2011-09-233-158/+60
| | | | llvm-svn: 140390
* Fix up comment now that 'new' is no longer a virt-specifier, from Aaron BallmanDouglas Gregor2011-09-231-1/+0
| | | | llvm-svn: 140389
* Eliminate an MSVC comparison warning, from Aaron BallmanDouglas Gregor2011-09-231-1/+1
| | | | llvm-svn: 140388
* PTX: Fix another 80-column violationJustin Holewinski2011-09-231-1/+2
| | | | llvm-svn: 140387
* PTX: Handle function call return valuesJustin Holewinski2011-09-233-18/+68
| | | | llvm-svn: 140386
* Fix 80 column violations.Richard Osborne2011-09-233-8/+16
| | | | | | Original patch by Liu. llvm-svn: 140385
* Work on Windows port by Ruben Van BoxemHoward Hinnant2011-09-238-30/+159
| | | | llvm-svn: 140384
* Implement Chris's suggestion of legalizing the various SSE and AVXDuncan Sands2011-09-232-64/+13
| | | | | | hadd/hsub intrinsics into the new fhadd/fhsub X86 node. llvm-svn: 140383
* Fix wrong comment about reentering template scope for ↵Francois Pichet2011-09-231-1/+1
| | | | | | -fdelayed-template-parsing. llvm-svn: 140382
* Modified demo to use 3.0 resume instruction vs calling _Unwine_Resume.Garrison Venn2011-09-231-93/+116
| | | | | | | | | | | | | | Also conducted some reformatting. As the LLVM coding standard doc does not seem to touch on how to align function arguments, and format code longer than 80 cols in general, the confusion persists. There is the golden rule, but as this code has gone through several styles to deal with this, the golden rule seems to be ignored. The latest reformatting effort tries to match the other source files as much as possible. Tested on OS X 10.7.1 with, and without the OLD_EXC_SYSTEM defined. Have NOT tested on LINUX. llvm-svn: 140379
OpenPOWER on IntegriCloud