daa6efe771f5f068e29328a774fa5bf2358ce14a |
|
21-Dec-2011 |
Sean Callanan <scallanan@apple.com> |
The "desired result type" code in the expression parser has hitherto been an implementation waiting for a use. I have now tied the '-o' option for the expression command -- which indicates that the result is an Objective-C object and needs to be printed -- to the ExpressionParser, which communicates the desired type to Clang. Now, if the result of an expression is determined by an Objective-C method call for which there is no type information, that result is implicitly cast to id if and only if the -o option is passed to the expression command. (Otherwise if there is no explicit cast Clang will issue an error. This behavior is identical to what happened before r146756.) Also added a testcase for -o enabled and disabled. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147099 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Expression/ASTResultSynthesizer.h
|
e1301a62783cf0d5457350b90830917841cbf6fc |
|
06-Dec-2011 |
Sean Callanan <scallanan@apple.com> |
As part of the work to make Objective-C type information from symbols more accessible, I have added a second map to the ClangASTImporter: the ObjCInterfaceMetaMap. This map keeps track of all type definitions found for a particular Objective-C interface, allowing the ClangASTSource to refer to all possible sources when looking for method definitions. There is a bug in lookup that I still need to figure out, but after that we should be able to report full method information for Objective-C classes shown in symbols. Also fixed some errors I ran into when enabling the maps for the persistent type store. The persistent type store previously did not use the ClangASTImporter to import types, instead using ASTImporters that got allocated each time a type needed copying. To support the requirements of the persistent type store -- namely, that types must be copied, completed, and then completely severed from their origin in the parser's AST context (which will go away) -- I added a new function called DeportType which severs all these connections. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145914 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Expression/ASTResultSynthesizer.h
|
fecc09c3709262515add87254cb973ce5175f17b |
|
19-Nov-2011 |
Sean Callanan <scallanan@apple.com> |
Pulled in a new revision of LLVM/Clang and added several patches. These patches fix a problem where templated types were not being completed the first time they were used, and fix a variety of minor issues I discovered while fixing that problem. One of the previous local patches was resolved in the most recent Clang, so I removed it. The others will be removed in due course. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144984 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Expression/ASTResultSynthesizer.h
|
2431244f929e269c6ecd51aa3eb606b6a2474f19 |
|
23-Aug-2011 |
Sean Callanan <scallanan@apple.com> |
Added support for persistent types to the expression parser. You can use a persistent type like this: (lldb) expr struct $foo { int a; int b; }; (lldb) struct $foo i; i.a = 2; i.b = 3; i ($foo) $0 = { (int) a = 2 (int) b = 3 } typedefs work similarly. This patch affects the following files: test/expression_command/persistent_types/* A test case for persistent types, in particular structs and typedefs. ClangForward.h Added TypeDecl, needed to declare some functions in ASTResultSynthesizer.h ClangPersistentVariables.[h,cpp] Added a list of persistent types to the persistent variable store. ASTResultSynthesizer.[h,cpp] Made the AST result synthesizer iterate across TypeDecls in the expression, and record any persistent types found. Also made a minor documentation fix. ClangUserExpression.[h,cpp] Extended the user expression class to keep the state needed to report the persistent variable store for the target to the AST result synthesizers. Also introduced a new error code for expressions that executed normally but did not return a result. CommandObjectExpression.cpp Improved output for expressions (like declarations of new persistent types) that don't return a result. This is no longer treated as an error. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138383 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Expression/ASTResultSynthesizer.h
|
bdcb6abaa287df2c5f312c51d993c1d0b0cb120c |
|
26-Jan-2011 |
Greg Clayton <gclayton@apple.com> |
Enabled extra warnings and fixed a bunch of small issues. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124250 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Expression/ASTResultSynthesizer.h
|
3aa7da5cb3327792415de44405e0896c6bdc305b |
|
13-Dec-2010 |
Sean Callanan <scallanan@apple.com> |
Added support for generating expressions that have access to the members of the Objective-C self object. The approach we take is to generate the method as a @category on top of the self object, and to pass the "self" pointer to it. (_cmd is currently NULL.) Most changes are in ClangExpressionDeclMap, but the change that adds support to the ABIs to pass _cmd touches a fair amount of code. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121722 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Expression/ASTResultSynthesizer.h
|
a91dd997b1e809c67901b7ac481942cacae19150 |
|
19-Nov-2010 |
Sean Callanan <scallanan@apple.com> |
Added support for indicating to the expression parser that the result of an expression should be coerced to a specific type. Also made breakpoint conditions pass in the bool type for this type. The expression parser ignores this indication for now. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@119779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Expression/ASTResultSynthesizer.h
|
8de27c761a22187ef63fb60000894be163e7285f |
|
16-Oct-2010 |
Greg Clayton <gclayton@apple.com> |
Made many ConstString functions inlined in the header file. Changed all of our synthesized "___clang" functions, types and variables that get used in expressions over to have a prefix of "$_lldb". Now when we do name lookups we can easily switch off of the first '$' character to know if we should look through only our internal (when first char is '$') stuff, or when we should look through program variables, functions and types. Converted all of the clang expression code over to using "const ConstString&" values for names instead of "const char *" since there were many places that were converting the "const char *" names into ConstString names and them throwing them away. We now avoid making a lot of ConstString conversions and benefit from the quick comparisons in a few extra spots. Converted a lot of code from LLVM coding conventions into LLDB coding conventions. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116634 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Expression/ASTResultSynthesizer.h
|
47a5c4c01066ece2d41cba56c3a065eeca12d47c |
|
23-Sep-2010 |
Sean Callanan <scallanan@apple.com> |
Updated to latest LLVM. Major LLVM changes: - Sema is now exported (and there was much rejoicing.) - Storage classes are now centrally defined. Also fixed some bugs that the new LLVM picked up. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114622 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Expression/ASTResultSynthesizer.h
|
65dafa8344c8c018e346dd331a7782081a896239 |
|
27-Aug-2010 |
Sean Callanan <scallanan@apple.com> |
This is a major refactoring of the expression parser. The goal is to separate the parser's data from the data belonging to the parser's clients. This allows clients to use the parser to obtain (for example) a JIT compiled function or some DWARF code, and then discard the parser state. Previously, parser state was held in ClangExpression and used liberally by ClangFunction, which inherited from ClangExpression. The main effects of this refactoring are: - reducing ClangExpression to an abstract class that declares methods that any client must expose to the expression parser, - moving the code specific to implementing the "expr" command from ClangExpression and CommandObjectExpression into ClangUserExpression, a new class, - moving the common parser interaction code from ClangExpression into ClangExpressionParser, a new class, and - making ClangFunction rely only on ClangExpressionParser and not depend on the internal implementation of ClangExpression. Side effects include: - the compiler interaction code has been factored out of ClangFunction and is now in an AST pass (ASTStructExtractor), - the header file for ClangFunction is now fully documented, - several bugs that only popped up when Clang was deallocated (which never happened, since the lifetime of the compiler was essentially infinite) are now fixed, and - the developer-only "call" command has been disabled. I have tested the expr command and the Objective-C step-into code, which use ClangUserExpression and ClangFunction, respectively, and verified that they work. Please let me know if you encounter bugs or poor documentation. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112249 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Expression/ASTResultSynthesizer.h
|