summaryrefslogtreecommitdiffstats
path: root/clang/Driver
Commit message (Collapse)AuthorAgeFilesLines
...
* Introduction the DeclarationName class, as a single, general method ofDouglas Gregor2008-11-172-24/+27
| | | | | | | | representing the names of declarations in the C family of languages. DeclarationName is used in NamedDecl to store the name of the declaration (naturally), and ObjCMethodDecl is now a NamedDecl. llvm-svn: 59441
* Fix <rdar://problem/6372970> clang ObjC rewriter: incorrect cast when ↵Steve Naroff2008-11-141-0/+1
| | | | | | | | passing block argument SynthBlockInitExpr() was not adding by-ref arguments to the init expr. llvm-svn: 59322
* Fix <rdar://problem/6370288> clang ObjC rewriter: Too many _objc_symtab, ↵Steve Naroff2008-11-141-9/+9
| | | | | | _OBJC_SYMBOLS llvm-svn: 59301
* Fix an obscure rewriter bug when rewriting implementations that don't have a ↵Steve Naroff2008-11-131-6/+15
| | | | | | corresponding interface (found while doing random testing on another bug). llvm-svn: 59259
* Fix <rdar://problem/6343942> clang ObjC rewriter: crash rewriting blocks Steve Naroff2008-11-131-1/+1
| | | | | | and <rdar://problem/6344601> clang ObjC rewriter: crash passing Block parameter? llvm-svn: 59251
* Obey the FIXMES!Daniel Dunbar2008-11-131-5/+1
| | | | | | | | - Resume running the always inliner pass always now that LLVM has been improved and functions with debug info can be inlined. - Remove unused header. llvm-svn: 59223
* [LLVM up] Update for raw_fd_ostream change. This fixes a FIXME thatDaniel Dunbar2008-11-137-11/+10
| | | | | | | | the Backend output should be done in binary mode. - I'd appreciate it if someone who has a Windows build could verify this. llvm-svn: 59221
* Implement support for operator overloading using candidate operatorDouglas Gregor2008-11-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | functions for built-in operators, e.g., the builtin bool operator==(int const*, int const*) can be used for the expression "x1 == x2" given: struct X { operator int const*(); } x1, x2; The scheme for handling these built-in operators is relatively simple: for each candidate required by the standard, create a special kind of candidate function for the built-in. If overload resolution picks the built-in operator, we perform the appropriate conversions on the arguments and then let the normal built-in operator take care of it. There may be some optimization opportunity left: if we can reduce the number of built-in operator overloads we generate, overload resolution for these cases will go faster. However, one must be careful when doing this: GCC generates too few operator overloads in our little test program, and fails to compile it because none of the overloads it generates match. Note that we only support operator overload for non-member binary operators at the moment. The other operators will follow. As part of this change, ImplicitCastExpr can now be an lvalue. llvm-svn: 59148
* Introduce a single AST node SizeOfAlignOfExpr for all sizeof and alignof ↵Sebastian Redl2008-11-112-6/+6
| | | | | | expressions, both of values and types. llvm-svn: 59057
* Move backend output out of destructor.Daniel Dunbar2008-11-112-3/+8
| | | | | | Don't free AST consumer when --disable-free is set. llvm-svn: 59030
* Remove unused function declaration.Daniel Dunbar2008-11-111-3/+0
| | | | llvm-svn: 59024
* Implement support for C++ nested-name-specifiers ('foo::bar::x') in the ↵Argyrios Kyrtzidis2008-11-081-3/+5
| | | | | | | | Parser side. No Sema functionality change, just the signatures of the Action/Sema methods. llvm-svn: 58913
* Patch by Nikita Zhuk: Add TranslationUnitActions to AnalysisConsumer.Ted Kremenek2008-11-071-0/+12
| | | | llvm-svn: 58831
* Initial, rudimentary implementation of operator overloading for binaryDouglas Gregor2008-11-061-1/+2
| | | | | | | | | | | | | | | | | | operators. For example, one can now write "x + y" where x or y is a class or enumeration type, and Clang will perform overload resolution for "+" based on the overloaded operators it finds. The other kinds of overloadable operators in C++ will follow this same approach. Three major issues remain: 1) We don't find member operators 2) Since we don't have user-defined conversion operators, we can't call any of the built-in overloaded operators in C++ [over.built]. 3) Once we've done the semantic checks, we drop the overloaded operator on the floor; it doesn't get into the AST at all. llvm-svn: 58821
* AnalysisManager can now be used to for analyses over TranslationUnits.Ted Kremenek2008-11-051-5/+22
| | | | llvm-svn: 58766
* Add a new expression class, ObjCSuperExpr, to handle the Objective-C ↵Douglas Gregor2008-11-041-3/+2
| | | | | | 'super'. Remove ObjCThis from PredefinedExpr llvm-svn: 58698
* Fix <rdar://problem/6339636> clang ObjC rewriter: Assertion failed: FileID-1 ↵Steve Naroff2008-11-031-28/+28
| | | | | | < FileIDs.size() && "Invalid FileID!", file c:\cygwin\home\Administrator\llvm\tools\clang\include\clang/Basic/SourceManager.h, line 513 llvm-svn: 58654
* Hook up the Plist diagnostic client to the driver.Ted Kremenek2008-11-034-12/+44
| | | | | | Fix Plist output. llvm-svn: 58652
* Rename 'HTMLDiagnostics.h' to 'PathDiagnosticClients.h'Ted Kremenek2008-11-033-3/+3
| | | | llvm-svn: 58646
* Fix <rdar://problem/6336774> clang block rewriter: Assertion failed: ↵Steve Naroff2008-11-032-0/+6
| | | | | | Offset+NumBytes <= size() && "Invalid region to erase!", file c:\cygwin\home\Administrator\llvm\to ols\clang\include\clang/Rewrite/RewriteRope.h, line 219. llvm-svn: 58607
* Turn off module verification in Release-Asserts builds.Daniel Dunbar2008-10-311-0/+4
| | | | llvm-svn: 58500
* "One" line fix for -parse-noop failure, "id" and several other thingsDaniel Dunbar2008-10-313-6/+6
| | | | | | | | were being treated as type names for non-Objective-C files. - Other lines are just because MinimalAction didn't have access to the LangOptions. llvm-svn: 58498
* Make sure RewriteObjCMethodDecl() does a block pointer rewrite.Steve Naroff2008-10-301-1/+6
| | | | llvm-svn: 58430
* Add a couple fixes for rewriting ivars/methods that use/contain blocks.Steve Naroff2008-10-301-2/+9
| | | | | | | | | | | | | | | | | | | Now this: @interface Test { void (^ivar)(void); } - (void)name; @end @implementation Test - (void)name { ivar = ^{ printf("hello\n"); }; // ((struct Test_IMPL *)self)->ivar = (void (*)(void))&__name_block_impl_0((void *)__name_block_func_0); ivar(); // ((void (*)(struct __block_impl *))((struct __block_impl *)((struct Test_IMPL *)self)->ivar)->FuncPtr)((struct __block_impl *)((struct Test_IMPL *)self)->ivar); } llvm-svn: 58428
* Convert SynthesizeBlockCall() from test->AST based implementation.Steve Naroff2008-10-301-37/+52
| | | | llvm-svn: 58427
* Adjust code format.Zhongxing Xu2008-10-301-2/+1
| | | | llvm-svn: 58420
* Convert SynthBlockInitExpr() from text->AST based implementation.Steve Naroff2008-10-291-16/+28
| | | | llvm-svn: 58396
* Handle block literals at file scope, remove some dead code, etc.Steve Naroff2008-10-291-109/+23
| | | | llvm-svn: 58390
* Make sure internally synthesized block pointer types are converted before ↵Steve Naroff2008-10-291-0/+5
| | | | | | pretty printing. llvm-svn: 58380
* Workaround an LLVM bug where inlining functions with debug info breaksDaniel Dunbar2008-10-291-2/+8
| | | | | | | | code generation. - For now, disable running the always inliner pass (at -O0) if we are also generating debug information. llvm-svn: 58376
* Improve llvm-gcc compatibility, -Os implies -O2 (sortof).Daniel Dunbar2008-10-291-1/+7
| | | | llvm-svn: 58374
* Choose CompileOptions (optimization passes) to match llvm-gcc moreDaniel Dunbar2008-10-291-1/+5
| | | | | | closely. llvm-svn: 58361
* .s files don't require the preprocessor, patch by Roman Divacky!Chris Lattner2008-10-281-1/+1
| | | | llvm-svn: 58349
* More changes necessary to integrate the objc and blocks rewriters.Steve Naroff2008-10-281-310/+409
| | | | | | | | | | | | | | With this commit, stuff like this is very close to working... [foo barf:^(int){ printf("whatever\n"); }]; Here is what is currently translates to... ((id (*)(id, SEL, void (^)(int)))(void *)objc_msgSend)((id)foo, sel_registerName("barf:"), (void (*)(int))__main_block_func_0); I just need make sure the funky cast on objc_msgSend() is converted from "void (^)(int)" to "void (*)(int)". Since the cast doesn't appear in the source code, it needs to be converted in RewriteObjC::SynthMessageExpr(). llvm-svn: 58348
* Access pass manager consistently.Daniel Dunbar2008-10-281-1/+1
| | | | | | - No functionality change. llvm-svn: 58342
* Rename ExplicitCCastExpr to CStyleCastExprDouglas Gregor2008-10-281-18/+18
| | | | llvm-svn: 58331
* Call llvm_shutdown() on (normal) termination. This makes --time-passes usable.Daniel Dunbar2008-10-281-0/+5
| | | | llvm-svn: 58308
* With -verify, only exit early on failure.Daniel Dunbar2008-10-271-1/+6
| | | | | | - Nice if -verify test exercise the various cleanup functions. llvm-svn: 58285
* Remove unneeded CheckASTConsumer function.Daniel Dunbar2008-10-273-20/+4
| | | | | | - No functionality change. llvm-svn: 58282
* Fix testsuite regression for "crash.m".Steve Naroff2008-10-271-1/+3
| | | | llvm-svn: 58269
* Don't double free module when IRgen fails.Daniel Dunbar2008-10-271-2/+5
| | | | llvm-svn: 58266
* Improve dependency file support.Daniel Dunbar2008-10-271-17/+42
| | | | | | | | | | | | - Add support for -MP (phony targets). - Use raw_ostream for output instead of std::string concatenation. - Break long lines in a GCC (4.2) compatible manner. - Output dependents in #included order (to match GCC). llvm-svn: 58265
* Refactor the expression class hierarchy for casts. Most importantly:Douglas Gregor2008-10-271-30/+41
| | | | | | | | | | | | | | | | | | | | | | - CastExpr is the root of all casts - ImplicitCastExpr is (still) used for all explicit casts - ExplicitCastExpr is now the root of all *explicit* casts - ExplicitCCastExpr (new name needed!?) is a C-style cast in C or C++ - CXXFunctionalCastExpr inherits from ExplicitCastExpr - CXXNamedCastExpr inherits from ExplicitCastExpr and is the root of all of the C++ named cast expression types (static_cast, dynamic_cast, etc.) - Added classes CXXStaticCastExpr, CXXDynamicCastExpr, CXXReinterpretCastExpr, and CXXConstCastExpr to Also, fixed returned-stack-addr.cpp, which broke once when we fixed reinterpret_cast to diagnose double->int* conversions and again when we eliminated implicit conversions to reference types. The fix is in both testcase and SemaChecking.cpp. Most of this patch is simply support for the renaming. There's very little actual change in semantics. llvm-svn: 58264
* Some fixups to the previous objc/blocks rewriter smerge.Steve Naroff2008-10-271-11/+21
| | | | llvm-svn: 58262
* Integrate the blocks and objc rewriters.Steve Naroff2008-10-271-13/+840
| | | | llvm-svn: 58253
* Rename Characteristic_t to CharacteristicKindChris Lattner2008-10-272-7/+7
| | | | llvm-svn: 58224
* Remember whether an initlist had a designator in the AST.Chris Lattner2008-10-261-3/+4
| | | | llvm-svn: 58218
* pass designators into sema. This completes parser-level designatorChris Lattner2008-10-261-0/+1
| | | | | | support as far as I know. llvm-svn: 58217
* Allow \n for newlines in expected error messages.Sebastian Redl2008-10-261-0/+4
| | | | llvm-svn: 58198
* Don't give a default argument to ASTContext::getFunctionType for the ↵Argyrios Kyrtzidis2008-10-261-12/+12
| | | | | | | | | TypeQuals parameter, it causes subtle bugs where TypeQuals, while necessary, are omitted from the call. -Remove the default argument. -Update all call sites of ASTContext::getFunctionType. llvm-svn: 58187
OpenPOWER on IntegriCloud