Commit Graph

148880 Commits

Author SHA1 Message Date
Rafael Espindola f1d3a37427 Delete dead code from the linker.
llvm-svn: 181094
2013-05-04 02:13:18 +00:00
Sean Callanan 0325fb8576 Added a function to check whether a Decl is in
the list of Decls for a given DeclContext.  This
is useful for LLDB's implementation of
FindExternalLexicalDecls.

llvm-svn: 181093
2013-05-04 02:04:27 +00:00
Richard Smith b875c43307 Simplify slightly.
llvm-svn: 181092
2013-05-04 01:51:08 +00:00
Greg Clayton 1b7746e383 After recent OperatingsSystem plug-in changes, the lldb_private::Process and lldb_private::Thread subclasses were changed and the API was not respected properly.
This checkin aims to fix this. The process now has two thread lists: a real thread list for threads that are created by the lldb_private::Process subclass, and the user visible threads. The user visible threads are the same as the real threas when no OS plug-in in used. But when an OS plug-in is used, the user thread can be a combination of real and "memory" threads. Real threads can be placed inside of memory threads so that a thread appears to be different, but is still controlled by the actual real thread. When the thread list needs updating, the lldb_private::Process class will call the: lldb_private::Process::UpdateThreadList() function with the old real thread list, and the function is expected to fill in the new real thread list with the current state of the process. After this function, the process will check if there is an OS plug-in being used, and if so, it will give the old user thread list, the new real thread list and the OS plug-in will create the new user thread list from both of these lists. If there is no OS plug-in, the real thread list is the user thread list.

These changes keep the lldb_private::Process subclasses clean and no changes are required.

llvm-svn: 181091
2013-05-04 01:38:48 +00:00
Krzysztof Parzyszek cd410d04db Use consistent function names.
llvm-svn: 181090
2013-05-04 01:30:49 +00:00
Richard Smith 01518fa77a Separate out and special-case the diagnostic for 'auto' in a
conversion-type-id, in preparation for this becoming valid in c++1y mode.
No functionality change; small diagnostic improvement.

llvm-svn: 181089
2013-05-04 01:26:46 +00:00
Ted Kremenek 7b9b5a2c48 [analyzer;alternate edges] start experimenting with control flow "barriers" to prevent an edge being optimized away.
llvm-svn: 181088
2013-05-04 01:13:22 +00:00
Ted Kremenek 992b3112ce [analyzer;alternate edges] ignore parentheses when determining edge levels.
llvm-svn: 181087
2013-05-04 01:13:12 +00:00
Ted Kremenek bcd6b0d891 [analyzer; alternate edges] - eliminate unnecessary edges where between parents and subexpressions.
llvm-svn: 181086
2013-05-04 01:13:08 +00:00
Ted Kremenek ccb6d1ea0c [analyzer; alternate edges] - merge control edges where we descend to a subexpression and pop back out.
llvm-svn: 181085
2013-05-04 01:13:05 +00:00
Ted Kremenek 6cf3c97c55 [analyzer; alternate edges] prune edges whose end/begin locations have the same statement parents.
This change required some minor changes to LocationContextMap to have it map
from PathPieces to LocationContexts instead of PathDiagnosticCallPieces to
LocationContexts.  These changes are in the other diagnostic
generation logic as well, but are functionally equivalent.

Interestingly, this optimize requires delaying "cleanUpLocation()" until
later; possibly after all edges have been optimized.  This is because
we need PathDiagnosticLocations to refer to the semantic entity (e.g. a statement)
as long as possible.  Raw source locations tell us nothing about
the semantic relationship between two locations in a path.

llvm-svn: 181084
2013-05-04 01:13:01 +00:00
Ted Kremenek 74c0d388e8 [analyzer;alternate edges] - add in events (loop iterations, etc)
These were being dropped due a transcription mistake from the original
algorithm.

llvm-svn: 181083
2013-05-04 01:12:55 +00:00
Nick Lewycky 881e9d62e2 Tabs to spaces. No functionality change.
llvm-svn: 181082
2013-05-04 01:08:15 +00:00
Fariborz Jahanian 6738e430a9 [doc parsing]: Make warning about unknown command
tags off by default for now. Move diagnostic code
to DiagnosticCommentKinds.td. // rdar://12381408

llvm-svn: 181081
2013-05-04 00:47:28 +00:00
Jason Molenda fe806906d4 fix a couple of clang static analyzer warnings.
Most important was a new[] + delete mismatch in ScanFormatDescriptor()
and a couple of possible memory leaks in FileSpec::EnumerateDirectory().

llvm-svn: 181080
2013-05-04 00:39:52 +00:00
Amara Emerson d9104c0359 Revert r181009.
llvm-svn: 181079
2013-05-03 23:57:17 +00:00
Jason Molenda c16b4af0d7 Remove the UUID::GetAsCString() method which required a buffer to save the
UUID string in; added UUID::GetAsString() which returns the uuid string in
a std::string.  Updated callers to use the new method.

llvm-svn: 181078
2013-05-03 23:56:12 +00:00
Richard Smith 47752e489e ArrayRef'ize MultiLevelTemplateArgumentList::ArgList. Patch by Faisal Vali!
llvm-svn: 181077
2013-05-03 23:46:09 +00:00
Douglas Gregor b4eadc34e1 <rdar://problem/13806270> A template argument list is a constant-evaluated context.
llvm-svn: 181076
2013-05-03 23:44:54 +00:00
Enrico Granata 3880c4cebd Don’t use the resolved value to calculate the location unless the variable is in a register
This was causing a bunch of test cases to fail in python_api/process since they relied on SBValue::GetLocation()

llvm-svn: 181075
2013-05-03 23:28:47 +00:00
Greg Clayton b23b11300a Unbreak lldb/test/macosx/universal.
llvm-svn: 181074
2013-05-03 23:22:20 +00:00
Argyrios Kyrtzidis 56c56d218d Revert r177218.
Per discussion in cfe-commits, asserting may be a better way than introducing a special test flag.

llvm-svn: 181073
2013-05-03 23:20:27 +00:00
Reed Kotler 0f2b10eb0d Remove some uneeded pseudos in the presence of the naked function attribute.
llvm-svn: 181072
2013-05-03 23:17:24 +00:00
Fariborz Jahanian 5b637078e1 [Doc parsing] Provide diagnostics for unknown documentation
commands. // rdar://12381408

llvm-svn: 181071
2013-05-03 23:15:20 +00:00
Douglas Gregor 30071cead9 Remove DiagnosticConsumer::clone(), a bad idea that is now unused.
llvm-svn: 181070
2013-05-03 23:07:45 +00:00
Greg Clayton 5fe0e7b2f6 Fixed a test suite typo error that caused the test to fail.
llvm-svn: 181069
2013-05-03 23:04:47 +00:00
Jim Ingham a8ca6e2145 Don't check the private state in DoOnRemoval, check whether THIS event caused a restart.
rdar://problem/13788593

llvm-svn: 181068
2013-05-03 23:04:37 +00:00
Douglas Gregor 6b930967e8 When building a module, forward diagnostics to the outer diagnostic consumer.
Previously, we would clone the current diagnostic consumer to produce
a new diagnostic consumer to use when building a module. The problem
here is that we end up losing diagnostics for important diagnostic
consumers, such as serialized diagnostics (where we'd end up with two
diagnostic consumers writing the same output file). With forwarding,
the diagnostics from all of the different modules being built get
forwarded to the one serialized-diagnostic consumer and are emitted in
a sane way.

Fixes <rdar://problem/13663996>.

llvm-svn: 181067
2013-05-03 22:58:43 +00:00
Amara Emerson b2a1cb87b1 Delete test instead.
llvm-svn: 181066
2013-05-03 22:39:03 +00:00
Argyrios Kyrtzidis 37e48ff547 [Preprocessor] For the MacroExpands preprocessor callback, also pass the MacroArgs object that provides information about
the argument tokens for a function macro.

llvm-svn: 181065
2013-05-03 22:31:32 +00:00
Argyrios Kyrtzidis 5d2ce840c1 Rename ObjCImplementationDecl::getSuperLoc() -> getSuperClassLoc() for consistency with ObjCInterfaceDecl::getSuperClassLoc()
llvm-svn: 181064
2013-05-03 22:31:26 +00:00
Jason Molenda 60e58967f9 Small adjustment to PlatformDarwinKernel::ExamineKextForMatchingUUID to
help performance -- if the FileSpec we're examining does not contain the
UUID we're looking for, don't bother examining the file any further.

llvm-svn: 181063
2013-05-03 22:28:10 +00:00
Amara Emerson 55be0c840e Temporarily disable failing test.
llvm-svn: 181062
2013-05-03 22:27:48 +00:00
Greg Clayton aa49c83cd9 Clear up any deadlocks on Apple builds that were due to the lldb_private::Process.m_private_run_lock variable.
If someone on Linux and/or FreeBSD can try to comment out the " #if defined(__APPLE__)" that surrounds access to "m_private_run_lock" and run the test suite, that would be nice. The new location where the locking/unlocking happens is bulletproof on MacOSX, and I want to verify that it is good on linux as well.

llvm-svn: 181061
2013-05-03 22:25:56 +00:00
Bill Wendling e575be4c0e I was wrong in my testing.
There isn't a speedup when using unbuffered I/O. It slows it down in fact.

llvm-svn: 181060
2013-05-03 22:06:41 +00:00
Bill Wendling 67758579f5 Remove this hack. We can support this better with function attributes.
llvm-svn: 181059
2013-05-03 21:53:50 +00:00
Wei Pan c4c76d1b4f Test commit
llvm-svn: 181057
2013-05-03 21:07:45 +00:00
Adrian Prantl 52bf3c4c3f Reapply r180982 with repaired logic and an additional testcase.
Un-break the gdb buildbot.
- Use the debug location of the return expression for the cleanup code
  if the return expression is trivially evaluatable, regardless of the
  number of stop points in the function.
- Ensure that any EH code in the cleanup still gets the line number of
  the closing } of the lexical scope.
- Added a testcase with EH in the cleanup.

rdar://problem/13442648

llvm-svn: 181056
2013-05-03 20:11:48 +00:00
Ashok Thirumurthi d36712df8d Refactoring for struct UserArea:
- Decouples RegisterContext_x86_64 from UserArea.
- Restores the original definition of UserArea so that it can be used to generate offsets for use with ptrace.
- Moves UserArea to the 64-bit Linux specialization.

- Also fixes an off-by-one error for the size of m_gpr.
- Also adds a TODO comment noting the need for a mechanism to identify the correct plugin based on the target OS (and architecture).

Reviewed by: Matt Kopec and Samuel Jacob

llvm-svn: 181055
2013-05-03 20:00:17 +00:00
Ulrich Weigand b9d5d073d6 [PowerPC] Avoid using '$' in generated assembler code
PowerPC assemblers are supposed to support a stand-alone '$' symbol
as an alternative of '.' to refer to the current PC.  This does not
work in the LLVM assembler parser yet.

To avoid bootstrap failures when using the LLVM assembler as system
assembler, this patch modifies the assembler source code generated
by LLVM to avoid using '$' (and simply use '.' instead).

llvm-svn: 181054
2013-05-03 19:53:04 +00:00
Ulrich Weigand 2c3a219b76 [PowerPC] Parse platform-specifc variant kinds in AsmParser
This patch adds support for PowerPC platform-specific variant
kinds in MCSymbolRefExpr::getVariantKindForName, and also
adds a test case to verify they are translated to the appropriate
fixup type.

llvm-svn: 181053
2013-05-03 19:52:35 +00:00
Ulrich Weigand 300b6875fb [PowerPC] Add some Book II instructions to AsmParser
This patch adds a couple of Book II instructions (isync, icbi) to the
PowerPC assembler parser.  These are needed when bootstrapping clang
with the integrated assembler forced on, because they are used in
inline asm statements in the code base.

The test case adds the full list of Book II storage control instructions,
including associated extended mnemonics.  Again, those that are not yet
supported as marked as FIXME.

llvm-svn: 181052
2013-05-03 19:51:09 +00:00
Ulrich Weigand d839490f16 [PowerPC] Support extended mnemonics in AsmParser
This patch adds infrastructure to support extended mnemonics in the
PowerPC assembler parser.  It adds support specifically for those
extended mnemonics that LLVM will itself generate.

The test case lists *all* extended mnemonics according to the
PowerPC ISA v2.06 Book I, but marks those not yet supported
as FIXME.

llvm-svn: 181051
2013-05-03 19:50:27 +00:00
Ulrich Weigand 640192daa8 [PowerPC] Add assembler parser
This adds assembler parser support to the PowerPC back end.

The parser will run for any powerpc-*-* and powerpc64-*-* triples,
but was tested only on 64-bit Linux.  The supported syntax is
intended to be compatible with the GNU assembler.

The parser does not yet support all PowerPC instructions, but
it does support anything that is generated by LLVM itself.
There is no support for testing restricted instruction sets yet,
i.e. the parser will always accept any instructions it knows,
no matter what feature flags are given.

Instruction operands will be checked for validity and errors
generated.  (Error handling in general could still be improved.)

The patch adds a number of test cases to verify instruction
and operand encodings.  The tests currently cover all instructions
from the following PowerPC ISA v2.06 Book I facilities:
Branch, Fixed-point, Floating-Point, and Vector. 
Note that a number of these instructions are not yet supported
by the back end; they are marked with FIXME.

A number of follow-on check-ins will add extra features.  When
they are all included, LLVM passes all tests (including bootstrap)
when using clang -cc1as as the system assembler.

llvm-svn: 181050
2013-05-03 19:49:39 +00:00
Andrew Kaylor 3a8625dda9 Fix logic error in ProcessInfo::SetArg0
llvm-svn: 181049
2013-05-03 19:38:09 +00:00
Ben Langmuir ce914fc84b Serialization for captured statements
Add serialization for captured statements and captured decls.  Also add
a const_capture_iterator to CapturedStmt.

Test contributed by Wei Pan

Differential Revision: http://llvm-reviews.chandlerc.com/D727

llvm-svn: 181048
2013-05-03 19:20:19 +00:00
Shuxin Yang 637b9bebd4 Decompose GVN::processNonLocalLoad() (about 400 LOC) into smaller helper functions. No function change.
This function consists of following steps:
   1. Collect dependent memory accesses.
   2. Analyze availability.
   3. Perform fully redundancy elimination, or 
   4. Perform PRE, depending on the availability

 Step 2, 3 and 4 are now moved to three helper routines.

llvm-svn: 181047
2013-05-03 19:17:26 +00:00
Richard Smith fa11fd669f PR15906: The body of a lambda is not an evaluated subexpression; don't visit it when visiting such subexpressions.
llvm-svn: 181046
2013-05-03 19:16:22 +00:00
Enrico Granata 4ffff2791f Harden against potential empty nodes in the map
llvm-svn: 181045
2013-05-03 19:07:20 +00:00
Enrico Granata d03a273b96 <rdar://problem/13749871>
Improvements to the std::map data formatter to recognize when invalid memory is being explored and bail out instead of looping for a potentially very long time

llvm-svn: 181044
2013-05-03 19:04:35 +00:00