summaryrefslogtreecommitdiffstats
path: root/clang/Driver/clang.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix name of -x option for C preprocessed input; it should beDaniel Dunbar2009-01-291-1/+1
| | | | | | cpp-output, not c-cpp-output. llvm-svn: 63345
* next round of diagnostics cleanups, moving some Chris Lattner2009-01-291-1/+0
| | | | | | | diags around, eliminating #defines, etc. Patch by Anders Johnsen! llvm-svn: 63318
* Fix -Wimplicit-function-declaration, which required some refactoring andChris Lattner2009-01-291-1/+5
| | | | | | changes in various diagnostics code. llvm-svn: 63282
* Fix a wart that existed from before we had EXTWARN.Chris Lattner2009-01-291-9/+0
| | | | llvm-svn: 63272
* move library-specific diagnostic headers into library private dirs. ReduceChris Lattner2009-01-291-1/+1
| | | | | | redundant #includes. Patch by Anders Johnsen! llvm-svn: 63271
* Enhance PTHManager::Create() to take an optional Diagnostic* argument that ↵Ted Kremenek2009-01-281-1/+1
| | | | | | can be used to report issues such as a missing PTH file. llvm-svn: 63231
* Patch by Alexei Svitkine: Refactor Sema::ParseAST API to allow clients to ↵Ted Kremenek2009-01-281-3/+14
| | | | | | pass as an argument a TranslationUnit object whose contents live beyond the call to ParseAST. llvm-svn: 63175
* Add a preliminary version number.Mike Stump2009-01-281-0/+4
| | | | llvm-svn: 63168
* Split the single monolithic DiagnosticKinds.def file into oneChris Lattner2009-01-271-0/+1
| | | | | | | | | .def file for each library. This means that adding a diagnostic to sema doesn't require all the other libraries to be rebuilt. Patch by Anders Johnsen! llvm-svn: 63111
* Added clang option '--analyzer-display-progress' to indicate that the ↵Ted Kremenek2009-01-231-1/+6
| | | | | | analyzer should output 'ANALYZE:' messages to display its progress on a source file. llvm-svn: 62875
* When using -analyzer-output-plist always output a plist file even if it ↵Ted Kremenek2009-01-231-1/+1
| | | | | | contains no error reports. llvm-svn: 62871
* Use NonFragileABI as name of new Next abi. More comments Fariborz Jahanian2009-01-221-3/+3
| | | | | | for the new meta-data. llvm-svn: 62806
* Adjust to api change.Chris Lattner2009-01-221-1/+1
| | | | llvm-svn: 62785
* Refactoring ObjC Next's runtime classes in preparation forFariborz Jahanian2009-01-211-0/+6
| | | | | | the new ObjC's abi. llvm-svn: 62721
* Don't turn off blocks when compiling Obj-C codeAnders Carlsson2009-01-211-1/+2
| | | | llvm-svn: 62701
* Add -analyze action to run static analyzer, instead of inferring fromDaniel Dunbar2009-01-201-5/+3
| | | | | | individual checker options. llvm-svn: 62634
* add a simplified lexer ctor that sets up the lexer to raw-lex anChris Lattner2009-01-171-5/+1
| | | | | | entire file. llvm-svn: 62414
* this massive patch introduces a simple new abstraction: it makesChris Lattner2009-01-171-3/+3
| | | | | | | | | | | | | | | "FileID" a concept that is now enforced by the compiler's type checker instead of yet-another-random-unsigned floating around. This is an important distinction from the "FileID" currently tracked by SourceLocation. *That* FileID may refer to the start of a file or to a chunk within it. The new FileID *only* refers to the file (and its #include stack and eventually #line data), it cannot refer to a chunk. FileID is a completely opaque datatype to all clients, only SourceManager is allowed to poke and prod it. llvm-svn: 62407
* IdentifierInfo:Ted Kremenek2009-01-151-11/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - IdentifierInfo can now (optionally) have its string data not be co-located with itself. This is for use with PTH. This aspect is a little gross, as getName() and getLength() now make assumptions about a possible alternate representation of IdentifierInfo. Perhaps we should make IdentifierInfo have virtual methods? IdentifierTable: - Added class "IdentifierInfoLookup" that can be used by IdentifierTable to perform "string -> IdentifierInfo" lookups using an auxilliary data structure. This is used by PTH. - Perform tests show that IdentifierTable::get() does not slow down because of the extra check for the IdentiferInfoLookup object (the regular StringMap lookup does enough work to mitigate the impact of an extra null pointer check). - The upshot is that now that some IdentifierInfo objects might be owned by the IdentiferInfoLookup object. This should be reviewed. PTH: - Modified PTHManager::GetIdentifierInfo to *not* insert entries in IdentifierTable's string map, and instead create IdentifierInfo objects on the fly when mapping from persistent IDs to IdentifierInfos. This saves a ton of work with string copies, hashing, and StringMap lookup and resizing. This change was motivated because when processing source files in the PTH cache we don't need to do any string -> IdentifierInfo lookups. - PTHManager now subclasses IdentifierInfoLookup, allowing clients of IdentifierTable to transparently use IdentifierInfo objects managed by the PTH file. PTHManager resolves "string -> IdentifierInfo" queries by doing a binary search over a sorted table of identifier strings in the PTH file (the exact algorithm we use can be changed as needed). These changes lead to the following performance changes when using PTH on Cocoa.h: - fsyntax-only: 10% performance improvement - Eonly: 30% performance improvement llvm-svn: 62273
* Fix typo and spelling of -Wunused-macros.Daniel Dunbar2009-01-141-2/+2
| | | | llvm-svn: 62239
* Add an initial framework of a DeclContextPrinter. It can print DeclContext andZhongxing Xu2009-01-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | its Decls in indented format. An Example: $ cat t.cpp class A { int a; void f(); }; void A::f() { a = 3; } $ clang -print-decl-contexts t.cpp [translation unit] 0x9754d7c <typedef> __builtin_va_list [class] A 0x9753310 <class> A 0x975ce20 <field> a <c++ method> f <c++ ctor> A <c++ ctor> A <c++ method> operator= <c++ dtor> ~A [c++ method] f [[0x9753310]] Some comments: '<>' indicates a declaration, '[]' indicates a definition, '[[ ]]' displays the semantic DeclContext which is different from the lexical DeclContext. The symbols printed can definitely be changed in the future. llvm-svn: 62136
* Implement support for anonymous structs and unions in C. Both C andDouglas Gregor2009-01-121-3/+0
| | | | | | | | | | | | | | C++ handle anonymous structs/unions in the same way. Addresses several bugs: <rdar://problem/6259534> <rdar://problem/6481130> <rdar://problem/6483159> The test case in PR clang/1750 now passes with -fsyntax-only, but CodeGen for inline assembler still fails. llvm-svn: 62112
* Always print out SourceManager stats with 'Stats' is true. This revealed ↵Ted Kremenek2009-01-091-2/+1
| | | | | | that PTH always pulls in the source pages with -fsyntax-only (investigating further). llvm-svn: 61996
* Enable support for '-x objective-c++-header'.Ted Kremenek2009-01-091-10/+24
| | | | llvm-svn: 61963
* Place warning about 'readonly' property attributes whichFariborz Jahanian2009-01-081-0/+8
| | | | | | | are related to setter syntax under -Wreadonly-setter-attrs to prevent warnings in projects built with gcc. llvm-svn: 61953
* Remove redunant (and incorrect) call to SourceManager::PrintStats(). This ↵Ted Kremenek2009-01-061-3/+0
| | | | | | would be called after a SourceManager was 'cleared', so it printed bogus results. Moreover, these stats are already printed earlier in the code path. llvm-svn: 61825
* Force i[0-9]86 to i386 when using LLVM_HOSTTRIPLE.Daniel Dunbar2008-12-121-1/+8
| | | | | | | Only use major part of OS version when on darwin and modifying OS part of target triple. llvm-svn: 60957
* -std=c99 defaults blocks to off even on darwin, but -fblocks overridesChris Lattner2008-12-051-2/+10
| | | | | | even it. llvm-svn: 60568
* instead of forcing blocks on by default, make them default to off, but letChris Lattner2008-12-041-2/+7
| | | | | | | | specific targets default them to on. Default blocks to on on 10.6 and later. Add a -fblocks option that allows the user to override the target's default. Use -fblocks in the various testcases that use blocks. llvm-svn: 60563
* replace useNeXTRuntimeAsDefault with a generic hook that allows targetsChris Lattner2008-12-041-6/+6
| | | | | | to specify their default language options. llvm-svn: 60561
* Add "-token-cache" option for using pretokenized cache files.Ted Kremenek2008-12-021-0/+15
| | | | llvm-svn: 60440
* Add LangOptions marker for assembler-with-cpp mode and use to defineDaniel Dunbar2008-12-011-0/+1
| | | | | | | __ASSEMBLER__ properly. Patch from Roman Divacky (with minor formatting changes). Thanks! llvm-svn: 60362
* Enable blocks in C++Douglas Gregor2008-12-011-3/+0
| | | | llvm-svn: 60361
* Implement implicit conversions for Objective-C specific types, e.g., Douglas Gregor2008-11-261-1/+1
| | | | | | | | | | | | converting a pointer to one Objective-C interface into a pointer to another Objective-C interface, and conversions with 'id'. The semantics seems to match GCC, although they seem somewhat ad hoc. Fixed a few cases where we assumed the C++ definition of isObjectType, but were getting the C definition, causing failures in trouble with conversions to void pointers. llvm-svn: 60130
* Add plugin loading for clang. This will be used to load alternative ↵Zhongxing Xu2008-11-261-0/+1
| | | | | | constraint manager for static analysis. llvm-svn: 60091
* reverting this because it breaks some blocks cases, I'll send doug a testcaseTed Kremenek2008-11-221-0/+3
| | | | llvm-svn: 59850
* Don't turn off blocks in C++Douglas Gregor2008-11-211-3/+0
| | | | llvm-svn: 59827
* switch TextDiagnosticPrinter to raw_ostream.Chris Lattner2008-11-191-1/+2
| | | | llvm-svn: 59597
* remove a helper method with only one call site.Chris Lattner2008-11-181-1/+1
| | | | llvm-svn: 59495
* Move backend output out of destructor.Daniel Dunbar2008-11-111-0/+3
| | | | | | Don't free AST consumer when --disable-free is set. llvm-svn: 59030
* Hook up the Plist diagnostic client to the driver.Ted Kremenek2008-11-031-1/+10
| | | | | | Fix Plist output. llvm-svn: 58652
* Rename 'HTMLDiagnostics.h' to 'PathDiagnosticClients.h'Ted Kremenek2008-11-031-1/+1
| | | | llvm-svn: 58646
* 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-311-2/+2
| | | | | | | | 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
* 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
* 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-271-9/+4
| | | | | | - No functionality change. llvm-svn: 58282
OpenPOWER on IntegriCloud