Commit Graph

113463 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen f152df1e6b Rename LowerSubregs to ExpandPostRAPseudos.
I'll fix the file contents in the next commit.

This pass is currently expanding the COPY and SUBREG_TO_REG pseudos. I
am going to add a hook so targets can expand more pseudo-instructions
after register allocation.

Many targets have pseudo-instructions that assist the register
allocator.  They can be expanded after register allocation, before PEI
and PostRA scheduling.

llvm-svn: 140469
2011-09-25 16:46:00 +00:00
Chandler Carruth 9d229f3eb1 Split the recursive macro expansion walk out from the routine which
emits a source snippet and caret line.

llvm-svn: 140467
2011-09-25 06:59:38 +00:00
Benjamin Kramer afe718f373 Add a missing increment to avoid infinite looping in the regression test.
Also make sure we set the error flag when correcting a typo.

llvm-svn: 140466
2011-09-25 02:41:26 +00:00
Benjamin Kramer f550fa9173 Sort CMakeLists.txt.
llvm-svn: 140465
2011-09-24 22:06:35 +00:00
Nadav Rotem c2deabd202 Implement Duncan's suggestion to use the result of getSetCCResultType if it is legal
(this is always the case for scalars), otherwise use the promoted result type.

Fix test/CodeGen/X86/vsplit-and.ll when promote-elements is enabled.

llvm-svn: 140464
2011-09-24 19:48:19 +00:00
Nadav Rotem 77426a754b [Vector-Select] Address one of the problems in 10902.
When generating the trunc-store of i1's, we need to use the vector type and not
the scalar type.

This patch fixes the assertion in CodeGen/Generic/bool-vector.ll when
running with -promote-elements.

llvm-svn: 140463
2011-09-24 18:32:19 +00:00
Benjamin Kramer c9d78d7444 Update CMake build.
llvm-svn: 140462
2011-09-24 18:21:37 +00:00
Sebastian Redl a72462cdf4 Add a special note for overload resolution when an initializer list argument
cannot be converted.
This is in preparation for overload resolution of initializer lists.
Currently, you will always get this message when you try to pass an init
list to an overloaded function.

llvm-svn: 140461
2011-09-24 17:48:32 +00:00
Sebastian Redl a74948d347 Correctly parse braced member initializers (even in delayed parsing) and correctly pass
the information on to Sema. There's still an incorrectness in the way template instantiation
works now, but that is due to a far larger underlying representational problem.
Also add a test case for various list initialization cases of scalars, which test this
commit as well as the previous one.

llvm-svn: 140460
2011-09-24 17:48:25 +00:00
Sebastian Redl 12757ab4cb Treat list-initialization of scalars as a first-class citizen in C++11.
Allow empty initializer lists for scalars, which mean value-initialization.
Constant evaluation for single-element and empty initializer lists for scalars.
Codegen for empty initializer lists for scalars.
Test case comes in next commit.

llvm-svn: 140459
2011-09-24 17:48:14 +00:00
Sebastian Redl 46975ea682 Fix the expected error for narrowing conversions in generalized-initializers.cpp to
match what the actual implementation of the error looks like.

llvm-svn: 140458
2011-09-24 17:48:06 +00:00
Sebastian Redl b49c46c25c Give InitListChecker a verification-only mode, where it neither emits diagnostics nor
builds a semantic (structured) initializer list, just reports on whether it can match
the given list to the target type.
Use this mode for doing init list checking in the initial step of initialization, which
will eventually allow us to do overload resolution based on the outcome.

llvm-svn: 140457
2011-09-24 17:48:00 +00:00
Sebastian Redl 7de1fb410c In Initialization, add step kind SK_ListConstructorCall (list-initialization
resolves to a constructor call in C++11) and failure kind
FK_ListInitializationFailed (early InitListChecker run failed).

llvm-svn: 140456
2011-09-24 17:47:52 +00:00
Sebastian Redl a846cac01b Inline Sema::CheckInitList into its only user.
llvm-svn: 140455
2011-09-24 17:47:46 +00:00
Sebastian Redl 26bcc942d0 Fix typos and non-doxygen-ness in a few comments.
llvm-svn: 140454
2011-09-24 17:47:39 +00:00
Francois Pichet d8e4e41301 [microsoft] In Microsoft mode, if we are inside a template class member function and we can't resolve an identifier then assume the identifier is type dependent. The goal is to postpone name lookup to instantiation time to be able to search into type dependent base classes.
This fixes a few errors when parsing MFC code with clang.
BTW clang trunk is now about 5 patches away to be able the parse the default wizard-generated MFC project.

llvm-svn: 140452
2011-09-24 10:38:05 +00:00
Greg Clayton d9dc52dc4c Added the ability to get all section contents, or the section
contents starting at an offset (2 separate methods). This helps
the scripting interface stay more natural by allowing both from
Python.

Added the ability to dump data with address annotations when
call SBData::GetDescription().

Hooked up the SBSection to the __repr__ so you can print section
objects from within python.

Improved the dumping of symbols from python.

Fixed the .i interface references which were set to "Relative to this Group"
which somehow included Jim's "lldb-clean" root directory in the path. The
interfaces are now in a folder called "interfaces" withing the Xcode API
subfolder.

llvm-svn: 140451
2011-09-24 05:04:40 +00:00
Johnny Chen 57087f3df3 Fix comment.
llvm-svn: 140450
2011-09-24 05:01:53 +00:00
Johnny Chen 5b94dc28b3 SBSection supports iteration through its subsections, represented as SBSection as well.
SBModule supports an additional SBSection iteration, besides the original SBSymbol iteration.
Add docstrings and implement the two SBSection iteration protocols.

llvm-svn: 140449
2011-09-24 04:51:43 +00:00
Benjamin Kramer 1f88d2f531 Fix comment typo.
Patch by Rui Paulo!

llvm-svn: 140448
2011-09-24 03:04:03 +00:00
Jason Molenda 0ca4f8bb9e Adjust kext load messages in DynamicLoaderDarwinKernel::ParseKextSummaries so we
print result information if a kext fails to be located or loaded for some reason.

llvm-svn: 140447
2011-09-24 02:47:39 +00:00
Akira Hatanaka 7d7ee0c3ac Add .td file.
llvm-svn: 140446
2011-09-24 01:40:18 +00:00
Akira Hatanaka e8b2a297c1 Revert change made in .gitignore.
llvm-svn: 140445
2011-09-24 01:37:58 +00:00
Greg Clayton f644ddf429 Fixed build issues after recent checkin.
Added the ability to get the name of the SBSection.

llvm-svn: 140444
2011-09-24 01:37:21 +00:00
Akira Hatanaka e96273e75d Preparation for adding simple Mips64 instructions.
llvm-svn: 140443
2011-09-24 01:34:44 +00:00
Greg Clayton 64a4eaae06 Added missing file.
llvm-svn: 140442
2011-09-24 01:32:22 +00:00
Jakob Stoklund Olesen 55cf2ed148 Only run MF.verify() with EXPENSIVE_CHECKS=1.
llvm-svn: 140441
2011-09-24 01:11:19 +00:00
Jim Ingham 810bf85e8a Add GetAddress to SBBreakpointLocation, and put the .i files in the API section of the Xcode project.
llvm-svn: 140440
2011-09-24 01:04:57 +00:00
Johnny Chen 90d6fe5d35 Add FindValue() and WatchValue() fuzz calls to the mix.
llvm-svn: 140439
2011-09-24 01:02:22 +00:00
Fariborz Jahanian 11ee283e2a objc - redeclaration of property in extension class
must match property type declaration in its
primary class. // rdar://10142679

llvm-svn: 140438
2011-09-24 00:56:59 +00:00
Greg Clayton cac9c5f971 Added to the public API to allow symbolication:
- New SBSection objects that are object file sections which can be accessed
  through the SBModule classes. You can get the number of sections, get a 
  section at index, and find a section by name.
- SBSections can contain subsections (first find "__TEXT" on darwin, then
  us the resulting SBSection to find "__text" sub section).
- Set load addresses for a SBSection in the SBTarget interface
- Set the load addresses of all SBSection in a SBModule in the SBTarget interface
- Add a new module the an existing target in the SBTarget interface
- Get a SBSection from a SBAddress object

This should get us a lot closer to being able to symbolicate using LLDB through
the public API.

llvm-svn: 140437
2011-09-24 00:52:29 +00:00
Johnny Chen 6027c94d2f Add an SB API SBFrame::WatchValue() and exported to the Python interface to
set a watchpoint Pythonically.  If the find-and-watch-a-variable operation
fails, an invalid SBValue is returned, instead.

Example Python usage:

        value = frame0.WatchValue('global',
                                  lldb.eValueTypeVariableGlobal,
                                  lldb.LLDB_WATCH_TYPE_READ|lldb.LLDB_WATCH_TYPE_WRITE)

Add TestSetWatchpoint.py to exercise this API.
We have 400 test cases now.

llvm-svn: 140436
2011-09-24 00:50:33 +00:00
Douglas Gregor 52da28be50 Don't translate CRLF files into LF files. Fixes PR6870, from Aaron Ballman!
llvm-svn: 140435
2011-09-23 23:43:36 +00:00
Daniel Dunbar eb5348ac31 Driver: Use sys::Process::SetWorkingDirectory, for consistency.
llvm-svn: 140434
2011-09-23 23:32:02 +00:00
Daniel Dunbar 9b92e2be30 sys::Process: Add a SetWorkingDirectory method.
llvm-svn: 140433
2011-09-23 23:23:36 +00:00
Fariborz Jahanian 44653709fd objc - fixes a crash when undefined typed property
followed by it implementation crashes when attempt
is made to access the synthesized ivar. 
// rdar://10177744

llvm-svn: 140432
2011-09-23 23:11:38 +00:00
Andrew Trick 8b2fe2f744 LSR minor bug fix in RateRegister.
No test case. Noticed by inspection and I doubt it ever affects the
outcome of the overall heuristic, let alone final codegen.

llvm-svn: 140431
2011-09-23 23:05:19 +00:00
Chris Lattner ad4ab93e48 Duncan owns dragonegg too, it's all his fault :)
llvm-svn: 140430
2011-09-23 22:46:43 +00:00
Jakob Stoklund Olesen 3bb99bc957 Verify that terminators follow non-terminators.
This exposes a -segmented-stacks bug.

llvm-svn: 140429
2011-09-23 22:45:39 +00:00
Eli Friedman 8a15a5aa93 PR10998: It is not legal to sink an instruction past the terminator of a block; make sure we don't do that.
llvm-svn: 140428
2011-09-23 22:41:57 +00:00
Matt Beaumont-Gay d0457924e3 Fix a crash-on-invalid.
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
2011-09-23 22:39:23 +00:00
Owen Anderson 4916840eb8 Teach the Thumb2 AsmParser to accept pre-indexed loads/stores with an offset of #-0.
llvm-svn: 140426
2011-09-23 22:25:02 +00:00
Jakob Stoklund Olesen 2056d15bd9 Also match negative offsets for addrmode3 and addrmode5.
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
2011-09-23 22:10:33 +00:00
Douglas Gregor 27f58c2e66 Fix up assertion a bit more
llvm-svn: 140424
2011-09-23 22:07:41 +00:00
Owen Anderson b75772201f Fix incorrect disassembly test.
llvm-svn: 140423
2011-09-23 22:05:54 +00:00
Owen Anderson b0b865d658 Add more fixed bits to USAT16 encoding to filter out incorrect decodings.
llvm-svn: 140422
2011-09-23 21:57:50 +00:00
Johnny Chen 12e27887cb Add a simple regression test for 'target stop-hook list' with no target specified.
It should not crash lldb.

llvm-svn: 140421
2011-09-23 21:34:40 +00:00
Owen Anderson 737beaf86d Post-index loads/stores in still need to print the post-indexed immediate, even if it's zero, to distinguish them from non-post-indexed instructions.
llvm-svn: 140420
2011-09-23 21:26:40 +00:00
Jim Ingham 76bb759605 Added a test for problems caused when Clang errantly makes the line range 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
2011-09-23 21:24:57 +00:00
Johnny Chen edf503757c Add a (bool)end_to_end parameter, default true, to the 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
2011-09-23 21:21:43 +00:00