- Feb 17, 2012
-
-
Sebastian Redl authored
Don't know what I was thinking there. Fixes PR12023. llvm-svn: 150804
-
Sebastian Redl authored
We now generate temporary arrays to back std::initializer_list objects initialized with braces. The initializer_list is then made to point at the array. We support both ptr+size and start+end forms, although the latter is untested. Array lifetime is correct for temporary std::initializer_lists (e.g. call arguments) and local variables. It is untested for new expressions and member initializers. Things left to do: Massively increase the amount of testing. I need to write tests for start+end init lists, temporary objects created as a side effect of initializing init list objects, new expressions, member initialization, creation of temporary objects (e.g. std::vector) for initializer lists, and probably more. Get lifetime "right" for member initializers and new expressions. Not that either are very useful. Implement list-initialization of array new expressions. llvm-svn: 150803
-
Alexey Samsonov authored
llvm-svn: 150802
-
Greg Clayton authored
internals. The first part of this is to use a new class: lldb_private::ExecutionContextRef This class holds onto weak pointers to the target, process, thread and frame and it also contains the thread ID and frame Stack ID in case the thread and frame objects go away and come back as new objects that represent the same logical thread/frame. ExecutionContextRef objcets have accessors to access shared pointers for the target, process, thread and frame which might return NULL if the backing object is no longer available. This allows for references to persistent program state without needing to hold a shared pointer to each object and potentially keeping that object around for longer than it needs to be. You can also "Lock" and ExecutionContextRef (which contains weak pointers) object into an ExecutionContext (which contains strong, or shared pointers) with code like ExecutionContext exe_ctx (my_obj->GetExectionContextRef().Lock()); llvm-svn: 150801
-
Gregory Szorc authored
llvm-svn: 150800
-
Gregory Szorc authored
llvm-svn: 150799
-
Richard Smith authored
variable ends, if the variable has a trivial destructor and no mutable subobjects then emit an llvm.invariant.start call for it. globalopt knows to make the variable const when evaluating this. llvm-svn: 150798
-
Eric Christopher authored
Fixes lots of gdb testsuite failures. llvm-svn: 150797
-
Eric Christopher authored
llvm-svn: 150796
-
Craig Topper authored
llvm-svn: 150795
-
Nick Lewycky authored
useful to represent a variable that is const in the source but can't be constant in the IR because of a non-trivial constructor. If globalopt evaluates the constructor, and there was an invariant.start with no matching invariant.end possible, it will mark the global constant afterwards. llvm-svn: 150794
-
Richard Smith authored
as constants. Refactor and simplify all the separate checks for whether a type can be emitted as a constant. llvm-svn: 150793
-
Richard Smith authored
1) It has a const-qualified type, and 2) It has no mutable members, and 3) It has no dynamic initialization, and 4) It has trivial destruction. Remove the unnecessary requirement that the type be POD. This allows us to mark all constexpr objects with no mutable members as 'constant'. llvm-svn: 150792
-
Douglas Gregor authored
we're capturing it by value in a non-mutable lambda. llvm-svn: 150791
-
Douglas Gregor authored
designators in the parser. In the worst case, this disambiguation requires tentative parsing just past the closing ']', but for most cases we'll be able to tell by looking ahead just one token (without going into the heavyweight tentative parsing machinery). llvm-svn: 150790
-
Richard Smith authored
can be represented by an LValue, and use that to simplify the code a little. llvm-svn: 150789
-
John McCall authored
optional argument passed through the variadic ellipsis) potentially affects how we need to lower it. Propagate this information down to the various getFunctionInfo(...) overloads on CodeGenTypes. Furthermore, rename those overloads to clarify their distinct purposes, and make sure we're calling the right one in the right place. This has a nice side-effect of making it easier to construct a function type, since the 'variadic' bit is no longer separable. This shouldn't really change anything for our existing platforms, with one minor exception --- we should now call variadic ObjC methods with the ... in the "right place" (see the test case), which I guess matters for anyone running GNUStep on MIPS. Mostly it's just a substantial clean-up. llvm-svn: 150788
-
John McCall authored
in the AST accessor and micro-optimize it very slightly. llvm-svn: 150787
-
John McCall authored
llvm-svn: 150786
-
Enrico Granata authored
llvm-svn: 150785
-
Enrico Granata authored
Adding formatters for several useful Objective-C/Cocoa data types. The new categories are not enabled at startup, but can be manually activated if desired. Adding new API calls to SBValue to be able to retrieve the associated formatters Some refactoring to FormatNavigator::Get() in order to shrink its size down to more manageable terms (a future, massive, refactoring effort will still be needed) Test cases added for the above llvm-svn: 150784
-
Douglas Gregor authored
conversion to function pointer. Rather than having IRgen synthesize the body of this function, we instead introduce a static member function "__invoke" with the same signature as the lambda's operator() in the AST. Sema then generates a body for the conversion to function pointer which simply returns the address of __invoke. This approach makes it easier to evaluate a call to the conversion function as a constant, makes the linkage of the __invoke function follow the normal rules for member functions, and may make life easier down the road if we ever want to constexpr'ify some of lambdas. Note that IR generation is responsible for filling in the body of __invoke (Sema just adds a dummy body), because the body can't generally be expressed in C++. Eli, please review! llvm-svn: 150783
-
Akira Hatanaka authored
instructions to be emitted. llvm-svn: 150782
-
Greg Clayton authored
register set where it could get an error when trying to restore the fake "f0" - "f7" 12 byte float regs. llvm-svn: 150781
-
Bill Wendling authored
llvm-svn: 150780
-
Bill Wendling authored
llvm-svn: 150779
-
Lang Hames authored
llvm-svn: 150778
-
Richard Smith authored
llvm-svn: 150777
-
Richard Smith authored
loop and switch statements, by teaching Scope that a function scope never has a continue/break parent for the purposes of control flow. Remove the hack in block and lambda expressions which worked around this by pretending that such expressions were continue/break scopes. Remove Scope::ControlParent, since it's unused. In passing, teach default statements to recover properly from a missing ';', and add a fixit for same to both default and case labels (the latter already recovered correctly). llvm-svn: 150776
-
Jia Liu authored
llvm-svn: 150775
-
Chad Rosier authored
entend flag. llvm-svn: 150774
-
Lang Hames authored
llvm-svn: 150773
-
Sean Callanan authored
which uses the Disassembler.h interface to the LLVM disassemblers rather than the EnhancedDisassembly.h interface. Disassembler.h is a better-maintained API and will be stabler in the long term. Currently the output from Disassembler.h does not provide for symbolic disassembly in all the places that the old disassembler did, so I have gated (and disabled) the disassembler. It'll be easy to flip the switch later. In the meantime, to enable the new disassembler, uncomment "#define USE_NEW_DISASSEMBLER" in lldb.cpp. llvm-svn: 150772
-
Lang Hames authored
llvm-svn: 150771
-
Richard Smith authored
zero-initialize class types with virtual bases when constant-evaluating an initializer. llvm-svn: 150770
-
Lang Hames authored
Re-enable 150652 and 150654 - Make FPSCR non-reserved, and make MachineCSE bail on reserved registers. This *should* be safe as of r150786. llvm-svn: 150769
-
Lang Hames authored
llvm-svn: 150768
-
Fariborz Jahanian authored
llvm-svn: 150767
-
Johnny Chen authored
memory read -f X doesn't print anything (lldb should warn when encountering an unsupported byte size) Also add a test sequence for it. rdar://problem/10876841 llvm-svn: 150766
-
- Feb 16, 2012
-
-
Eric Christopher authored
"Add a completed/incomplete type difference. This allows us to have partial types for contexts and forward decls while allowing us to complete types later on for debug purposes. This piggy-backs on the metadata replacement and rauw changes for temporary nodes and takes advantage of the incremental support I added in earlier. This allows us to, if we decide, to limit adding methods and variables to structures in order to limit the amount of debug information output into a .o file. The caching is a bit complicated though so any thoughts on untangling that are welcome." with a fix: - Remove all RAUW during type construction by adding stub versions of types that we later complete. and some TODOs: - Add an RAUW cache for forward declared types so that we can replace them at the end of compilation. - Remove the code that updates on completed types because we no longer need to have that happen. We emit incomplete types on purpose and only want to know when we want to complete them. llvm-svn: 150752
-