Commit Graph

121868 Commits

Author SHA1 Message Date
Douglas Gregor 656bc62a73 Remove the "unsupported" error for lambda expressions. It's annoying,
and rapidly becoming untrue.

llvm-svn: 150165
2012-02-09 08:26:42 +00:00
Douglas Gregor 291af2b7e6 Add a test for the non-aggregaticity of lambda types per C++11
[expr.prim.lambda].

llvm-svn: 150164
2012-02-09 08:15:36 +00:00
Douglas Gregor 8962549164 Implement C++ [expr.prim.lambda]p2, which bans lambda expressions in
unevaluated operands. Be certain that we're marking everything
referenced within a capture initializer as odr-used.

llvm-svn: 150163
2012-02-09 08:14:43 +00:00
Argyrios Kyrtzidis 7456ac44b0 [PCH] Add some comments, per Ted's request.
llvm-svn: 150162
2012-02-09 07:46:54 +00:00
Craig Topper 487e744f66 Flatten some of the arrays in the X86 disassembler tables to reduce space needed to store pointers on 64-bit hosts and reduce relocations needed at startup. Part of PR11953.
llvm-svn: 150161
2012-02-09 07:45:30 +00:00
Argyrios Kyrtzidis 5605de7c8b Fix ASTReader::FinishedDeserializing().
We were passing a decl to the consumer after all pending deserializations were finished
but this was not enough; due to processing by the consumer we may end up into yet another
deserialization process but the way FinishedDeserializing() was setup we would not ensure
that everything was fully deserialized before returning to the consumer.

Separate ASTReader::FinishedDeserializing() into two semantic actions.
The first is ensuring that a deserialization process ends up will fully deserialized decls/types even
if the process is started by the consumer.
The second is pushing "interesting" decls to the consumer; we make sure that we don't re-enter this
section recursively be checking a variable.

llvm-svn: 150160
2012-02-09 07:31:52 +00:00
Eric Christopher 39e39c8efe Don't cache the artificial type for the this pointer, there's no
difference in the qual type. This is a workaround for the fact that
the type isn't artificial but the this decl is, however, we don't
have any way of representing it in the current metadata. For now,
however, just don't cache the full type.

Fixes rdar://10831526 and probably a couple of others.

llvm-svn: 150159
2012-02-09 07:26:21 +00:00
Anna Zaks 78edc2fb3c [analyzer] MallocChecker: address a diagnostic "fixme".
llvm-svn: 150158
2012-02-09 06:48:19 +00:00
Richard Smith 4d59eebb49 DR1359: A constexpr constructor does not need to initialize an empty struct or
empty union. This still rejects anonymous member structs or unions which only
contain such empty class types, pending standard wording defining exactly what
an empty class type is.

llvm-svn: 150157
2012-02-09 06:40:58 +00:00
Anna Zaks 2b5bb97986 [analyzer] Add custom path diagnostic to the Malloc Checker.
Very simple so far - we just highlight every allocation and release
site.

llvm-svn: 150156
2012-02-09 06:25:51 +00:00
Anna Zaks 12259b443d [analyzer] MallocChecker cleanup, more tests.
llvm-svn: 150155
2012-02-09 06:25:47 +00:00
Greg Clayton c3776bf288 First pass at mach-o core file support is in. It currently works for x86_64
user space programs. The core file support is implemented by making a process
plug-in that will dress up the threads and stack frames by using the core file
memory. 

Added many default implementations for the lldb_private::Process functions so
that plug-ins like the ProcessMachCore don't need to override many many 
functions only to have to return an error.

Added new virtual functions to the ObjectFile class for extracting the frozen
thread states that might be stored in object files. The default implementations
return no thread information, but any platforms that support core files that
contain frozen thread states (like mach-o) can make a module using the core
file and then extract the information. The object files can enumerate the 
threads and also provide the register state for each thread. Since each object
file knows how the thread registers are stored, they are responsible for 
creating a suitable register context that can be used by the core file threads.

Changed the process CreateInstace callbacks to return a shared pointer and
to also take an "const FileSpec *core_file" parameter to allow for core file
support. This will also allow for lldb_private::Process subclasses to be made
that could load crash logs. This should be possible on darwin where the crash
logs contain all of the stack frames for all of the threads, yet the crash
logs only contain the registers for the crashed thrad. It should also allow
some variables to be viewed for the thread that crashed.

llvm-svn: 150154
2012-02-09 06:16:32 +00:00
Argyrios Kyrtzidis 6c07547b56 [PCH] Set the DeclContext before doing any deserialization, to make sure internal
calls to Decl::getASTContext() by Decl's methods will find the TranslationUnitDecl
without crashing due to a parent declaration context still deserializing.

llvm-svn: 150153
2012-02-09 06:02:44 +00:00
Lang Hames edeea175ad Preserve physreg kills in MachineBasicBlock::SplitCriticalEdge.
Failure to preserve kills was causing LiveIntervals to miss some EFLAGS live
ranges. Unfortunately I've been unable to reduce a good test case yet.

llvm-svn: 150152
2012-02-09 05:59:36 +00:00
NAKAMURA Takumi d5a504e52b test/CodeGen/X86/atom-lea-sp.ll: Add explicit -mtriple=i686-linux.
llvm-svn: 150151
2012-02-09 05:12:58 +00:00
Lang Hames 2176edf1c4 Fix kill flags when moving instructions using LiveIntervals::moveInstr(...).
llvm-svn: 150150
2012-02-09 04:45:38 +00:00
Lang Hames 95d6edeba8 Remove assertion. Not all use operands are reads.
llvm-svn: 150149
2012-02-09 04:39:48 +00:00
David Blaikie c8233cb740 Correct comment Clang C++ use in production.
This was from way-back-when (r82583) when Clang's C++ support wasn't prime-time
yet. Production quality C++ was tested experimentally from r100119 and turned
on by default in r141063.

Patch by Justin Bogner.

llvm-svn: 150148
2012-02-09 03:57:02 +00:00
Eli Friedman 8631f3e86a Use RAII object for cleanups.
llvm-svn: 150147
2012-02-09 03:47:20 +00:00
Eli Friedman c370a7eec7 Refactor lambda IRGen so AggExprEmitter::VisitLambdaExpr does the right thing.
llvm-svn: 150146
2012-02-09 03:32:31 +00:00
Richard Smith 5a294e6a2c CWG issue 1405: mutable members are allowed in literal types, but can't undergo
lvalue-to-rvalue conversions in constant expressions.

llvm-svn: 150145
2012-02-09 03:29:58 +00:00
Aaron Ballman 3bc84198f4 Attempting to initialize a union member that does not exist no longer crashes.
Patch by Remi Gacogne

llvm-svn: 150144
2012-02-09 03:29:06 +00:00
Sean Callanan 8a54a40a44 And the .zip file.
llvm-svn: 150143
2012-02-09 03:23:41 +00:00
Sean Callanan d2b465f17a Brought LLVM/Clang up to top of tree. The only
change (besides logging) is that now string
literals in the IR are ConstantDataArrays instead
of ConstantArrays.

llvm-svn: 150142
2012-02-09 03:22:41 +00:00
Eli Friedman 0cfd5bd67f Basic IRGen for LambdaExprs with captures.
llvm-svn: 150141
2012-02-09 03:19:12 +00:00
Eli Friedman 79399e883f A tiny bit more lambda IRGen.
llvm-svn: 150140
2012-02-09 02:56:22 +00:00
Eli Friedman faea56944c Fix a typo in the LambdaExpr class.
llvm-svn: 150139
2012-02-09 02:55:22 +00:00
Douglas Gregor 199cec7673 Implement capture-by-copy for arrays in lambdas.
llvm-svn: 150138
2012-02-09 02:45:47 +00:00
Argyrios Kyrtzidis 6f40eb7e56 [PCH] Avoid using Decl::setAttrs() and Decl::setLexicalDeclContext() from the ASTReaderDecl
directly; they internally call Decl::getASTContext() which may crash if a declaration context
parent is still deserializing.

llvm-svn: 150137
2012-02-09 02:44:08 +00:00
Douglas Gregor fbf19a0eb1 Don't complain about the lack of a constructor for a lambda expression. They are constructed in different ways
llvm-svn: 150136
2012-02-09 02:20:38 +00:00
Douglas Gregor 3d23f78852 When we create a non-static data member in the closure object for a
capture, make sure we actually add the field.

llvm-svn: 150135
2012-02-09 02:12:34 +00:00
Sean Callanan 12b0dabd31 Removed another debug message. Sigh...
llvm-svn: 150134
2012-02-09 02:04:23 +00:00
Johnny Chen 57816730f0 Add safe guard for when the 'expect' program cannot be located and skip the test.
llvm-svn: 150133
2012-02-09 02:01:59 +00:00
Douglas Gregor abecb9ce3c Factor the logic for capturing variables in a lambda into its own
function; it's going to get longer soon. No functionality change.

llvm-svn: 150132
2012-02-09 01:56:40 +00:00
Jim Ingham 6a4617bb01 Some Breakpoint:: methods crept down be log the Breakpoint::BreakpointEventData methods.
llvm-svn: 150131
2012-02-09 01:49:26 +00:00
Douglas Gregor ab23d9a9be Along the error path for lambdas, mark the lambda class as invalid and finalize it
llvm-svn: 150130
2012-02-09 01:28:42 +00:00
Douglas Gregor 9390e9cc49 Fix yet one more test
llvm-svn: 150129
2012-02-09 01:26:17 +00:00
Aaron Ballman c2a9493a26 Adding support for warning when a non-C compatible user-defined type is returned from an extern "C" function.
Fixes bug 6143

llvm-svn: 150128
2012-02-09 01:21:34 +00:00
Johnny Chen 177df6f35c Set the terminal type to 'xterm' before doing 'stty -a'.
llvm-svn: 150127
2012-02-09 01:16:04 +00:00
Douglas Gregor 26f4b32f26 Fix tests for r150123
llvm-svn: 150126
2012-02-09 01:02:27 +00:00
Sean Callanan acda6789df Remembered to NULL out the symbol, which was
causing testsuite crashes.

llvm-svn: 150125
2012-02-09 00:54:55 +00:00
Johnny Chen 4dcad1437c Make the expect_prompt more strict.
llvm-svn: 150124
2012-02-09 00:51:41 +00:00
Douglas Gregor 8c50e7c5e3 Various interrelated cleanups for lambdas:
- Complete the lambda class when we finish the lambda expression
    (previously, it was left in the "being completed" state)
  - Actually return the LambdaExpr object and bind to the resulting
  temporary when needed.
  - Detect when cleanups are needed while capturing a variable into a
  lambda (e.g., due to default arguments in the copy constructor), and
  make sure those cleanups apply for the whole of the lambda
  expression.
    

llvm-svn: 150123
2012-02-09 00:47:04 +00:00
Andrew Trick f542675ae3 Improve TargetPassConfig. No intended functionality.
Split CodeGen into stages.
Distinguish between optimization and correctness.

llvm-svn: 150122
2012-02-09 00:40:55 +00:00
Andrew Trick c24e09b226 comment
llvm-svn: 150121
2012-02-09 00:40:52 +00:00
David Blaikie e7d7a5dfaa Remove static initializer from DataStream.cpp
If someone would prefer a clear name for the 'success' error_value we could
come up with one - potentially just a 'named constructor' style
'error_value::success()' to make this expression more self-documenting. If
I see this come up in other cases I'll certainly consider it.

One step along the way to resolving PR11944.

llvm-svn: 150120
2012-02-09 00:29:19 +00:00
Johnny Chen 7cc99dc40f Add a case to test that 'stty -a' displays the same output before and after running the lldb command.
llvm-svn: 150119
2012-02-09 00:27:01 +00:00
Jakob Stoklund Olesen 938b4d26f1 Erase dead copies that are clobbered by a call.
This does make a difference, at least when using RABasic.

llvm-svn: 150118
2012-02-09 00:19:08 +00:00
Jakob Stoklund Olesen 4519fd0b21 Handle register masks when searching for EFLAGS clobbers.
Calls clobber the flags, but when using register masks there is no
EFLAGS<imp-def> operand.

llvm-svn: 150117
2012-02-09 00:17:22 +00:00
Jakob Stoklund Olesen 5d33291e8e Never delete instructions that define reserved registers.
I think this was already the intention, but DeadMachineInstructionElim
was accidentally tracking the liveness of reserved registers. Now,
instructions with reserved defs are never deleted.

This prevents the call stack adjustment instructions from getting
deleted when enabling register masks.

llvm-svn: 150116
2012-02-09 00:15:39 +00:00