summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
Commit message (Collapse)AuthorAgeFilesLines
* Given Decl::isUsed() a flag indicating when to consider the "used"Douglas Gregor2010-06-171-2/+2
| | | | | | | | | attribute as part of the calculation. Sema::MarkDeclReferenced(), and a few other places, want only to consider the "used" bit to determine, e.g, whether to perform template instantiation. Fixes a linkage issue with Boost.Serialization. llvm-svn: 106252
* Update CMake build for new attribute changes.Alexis Hunt2010-06-171-0/+2
| | | | llvm-svn: 106188
* Implement first TD-based usage of attributes.Alexis Hunt2010-06-162-72/+72
| | | | | | | | | | | | | | | | | Currently, there are two effective changes: - Attr::Kind has been changed to attr::Kind, in a separate namespace rather than the Attr class. This is because the enumerator needs to be visible to parse. - The class definitions for the C++0x attributes other than aligned are generated by TableGen. The specific classes generated by TableGen are controlled by an array in TableGen (see the accompanying commit to the LLVM repository). I will be expanding the amount of code generated as I develop the new attributes system while initially keeping it confined to these attributes. llvm-svn: 106172
* Frontend: Allow passing -cc1 level arguments to plugins. Patch by Troy ↵Daniel Dunbar2010-06-161-1/+13
| | | | | | Straszheim! llvm-svn: 106113
* Add Cygwin C++ header search path.Douglas Gregor2010-06-161-0/+2
| | | | llvm-svn: 106108
* fix the various buildbot failures by ensuring that tokens are really ↵Chris Lattner2010-06-151-4/+3
| | | | | | completely initialized. llvm-svn: 106043
* fix an uninitialized variable, patch by Michael Spencer!Chris Lattner2010-06-151-0/+2
| | | | llvm-svn: 106025
* Break Frontend's dependency on Rewrite, Checker and CodeGen in shared ↵Daniel Dunbar2010-06-1513-8700/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | library configuration Currently, all AST consumers are located in the Frontend library, meaning that in a shared library configuration, Frontend has a dependency on Rewrite, Checker and CodeGen. This is suboptimal for clients which only wish to make use of the frontend. CodeGen in particular introduces a large number of unwanted dependencies. This patch breaks the dependency by moving all AST consumers with dependencies on Rewrite, Checker and/or CodeGen to their respective libraries. The patch therefore introduces dependencies in the other direction (i.e. from Rewrite, Checker and CodeGen to Frontend). After applying this patch, Clang builds correctly using CMake and shared libraries ("cmake -DBUILD_SHARED_LIBS=ON"). N.B. This patch includes file renames which are indicated in the patch body. Changes in this revision of the patch: - Fixed some copy-paste mistakes in the header files - Modified certain aspects of the coding to comply with the LLVM Coding Standards llvm-svn: 106010
* Implement -fvisibility-inlines-hidden. <rdar://problem/7819834>Douglas Gregor2010-06-151-0/+6
| | | | llvm-svn: 106003
* Change AnalysisConsumer to analyze functions created by instantiantiating a ↵Ted Kremenek2010-06-151-2/+3
| | | | | | macro. Fixes PR 7361. llvm-svn: 105984
* fix the inline asm diagnostics to emit the error on the primary Chris Lattner2010-06-151-8/+17
| | | | | | | | | | | | | | | | | | | | | | source code location instead of on the note. Previously we generated: <inline asm>:1:2: error: unrecognized instruction barf ^ t.c:4:8: note: generated from here asm ("barf"); ^ Now we generate: t.c:4:8: error: unrecognized instruction asm ("barf"); ^ <inline asm>:1:2: note: instantated into assembly here barf ^ llvm-svn: 105978
* fix PR7360: -P mode turns off line markers, but not blank space.Chris Lattner2010-06-121-15/+10
| | | | | | | Apparently some programs which abuse the preprocessor depend on this. llvm-svn: 105889
* Fix PCH issue. Attributes of a declaration were truncated to just one when ↵Argyrios Kyrtzidis2010-06-111-1/+1
| | | | | | the decl was read from a PCH file. llvm-svn: 105852
* Driver: Fix arg_iterator typing to reflect that it is really an iterator ↵Daniel Dunbar2010-06-111-19/+22
| | | | | | over Arg*s. llvm-svn: 105838
* Preprocessor: Ignore unknown pragmas in -E -dM and -Eonly modes.Daniel Dunbar2010-06-112-0/+7
| | | | llvm-svn: 105830
* Add an option -fshow-overloads=best|all to limit the number of overloadJeffrey Yasskin2010-06-112-1/+14
| | | | | | | candidates printed. We default to 'all'. At the moment, 'best' prints only the first 4 overloads, but we'll improve that over time. llvm-svn: 105815
* Add an option to specify the target C++ ABI to the frontend. Use it toCharles Davis2010-06-112-0/+8
| | | | | | select either the default Itanium ABI or the new, experimental Microsoft ABI. llvm-svn: 105804
* Split DependentNameType into two types. DependentNameType represents theJohn McCall2010-06-112-0/+22
| | | | | | | | | | | | | | case of an elaborated-type-specifier like 'typename A<T>::foo', and DependentTemplateSpecializationType represents the case of an elaborated-type-specifier like 'typename A<T>::template B<T>'. The TypeLoc representation of a DependentTST conveniently exactly matches that of an ElaboratedType wrapping a TST. Kill off the explicit rebuild methods for RebuildInCurrentInstantiation; the standard implementations work fine because the nested name specifier is computable in the newly-entered context. llvm-svn: 105801
* Another chunk of the new RecursiveASTVisitor implementation: switch the returnChandler Carruth2010-06-101-1/+1
| | | | | | | value semantics such that we recurse while the visitors return true, and halt as soon as one returns false. Patch by csilvers. llvm-svn: 105787
* Frontend: Fix crashes on error paths.Daniel Dunbar2010-06-091-3/+3
| | | | llvm-svn: 105759
* Major redesign of the RecursiveASTVisitor. This implements the majority of theChandler Carruth2010-06-091-4/+4
| | | | | | | | | | new design discussed on cfe-dev, with further steps in that direction to come. It is already much more complete than the previous visitor. Patch by Zhanyong and Craig with 80 column wraps and one missing declaration added by me. llvm-svn: 105709
* Makefiles: Set Clang CPP compiler flags in a single location, instead of ↵Daniel Dunbar2010-06-081-2/+0
| | | | | | scattered throughout the project Makefiles. llvm-svn: 105638
* Makefile: Switch Clang Makefiles to always include the top-level Clang Makefile.Daniel Dunbar2010-06-081-2/+2
| | | | | | - This eliminates most dependencies on how Clang is installed relative to LLVM. llvm-svn: 105637
* Frontend: Add CodeGenAction support for handling LLVM IR.Daniel Dunbar2010-06-071-14/+74
| | | | | | | | | | | | | | | | | - This magically enables using 'clang -cc1' as a replacement for most of 'llvm-as', 'llvm-dis', 'llc' and 'opt' functionality. For example, 'llvm-as' is: $ clang -cc1 -emit-llvm-bc FOO.ll -o FOO.bc and 'llvm-dis' is: $ clang -cc1 -emit-llvm FOO.bc -o - and 'opt' is, e.g.: $ clang -cc1 -emit-llvm -O3 -o FOO.opt.ll FOO.ll and 'llc' is, e.g.: $ clang -cc1 -S -o - FOO.ll The nice thing about using the backend tools this way is that they are guaranteed to exactly match how the compiler generates code (for example, setting the same backend options). llvm-svn: 105583
* Frontend: Add FrontendAction support for handling LLVM IR inputs.Daniel Dunbar2010-06-074-2/+25
| | | | | | - These inputs follow an abbreviated execution path, but are still worth handling by FrontendAction so they reuse all the other clang -cc1 features. llvm-svn: 105582
* FrontendAction: Track active file kind.Daniel Dunbar2010-06-072-6/+9
| | | | llvm-svn: 105581
* Frontend: Rename hasASTSupport to hasASTFileSupport, which is more accurate.Daniel Dunbar2010-06-072-3/+4
| | | | llvm-svn: 105580
* Frontend: Move some initialization from CompilerInstance to FrontendAction, ↵Daniel Dunbar2010-06-073-25/+12
| | | | | | to parallel what is done for AST inputs. llvm-svn: 105579
* Frontend: Change FrontendAction::BeginSourceFile to take the input kind ↵Daniel Dunbar2010-06-073-3/+4
| | | | | | instead of an IsAST bool. llvm-svn: 105578
* Frontend: Lift InputKind enumeration to top level.Daniel Dunbar2010-06-074-64/+61
| | | | llvm-svn: 105577
* Frontend: Drop unnecessary TargetData argument to EmitBackendOutput, we alwaysDaniel Dunbar2010-06-072-21/+11
| | | | | | create modules which have target data strings. llvm-svn: 105576
* Frontend: Factor clang::EmitBackendOutput out of CodeGenAction.Daniel Dunbar2010-06-073-327/+359
| | | | llvm-svn: 105575
* Frontend: Add CodeGenOptions::SimplifyLibCalls, and eliminate LangOptions ↵Daniel Dunbar2010-06-072-5/+5
| | | | | | argument to BackendConsumer. llvm-svn: 105574
* Added AccessSpecDecl node.Abramo Bagnara2010-06-052-0/+17
| | | | llvm-svn: 105525
* Remember type source information for Objective C property declarations.John McCall2010-06-042-3/+3
| | | | llvm-svn: 105484
* Added a field to BlockDeclRefExpr for future use.Fariborz Jahanian2010-06-042-1/+3
| | | | | | No functionality change yet. llvm-svn: 105479
* Add ARM paths for debian. Not enough to bootstrap on a beagle board, butRafael Espindola2010-06-041-0/+2
| | | | | | moves us further. llvm-svn: 105468
* Restructure how we interpret block-literal declarators. Correctly handleJohn McCall2010-06-042-0/+2
| | | | | | | the case where we pick up block arguments from a typedef. Save the block signature as it was written, and preserve same through PCH. llvm-svn: 105466
* Hack in some really terrible C++ record PCH support that I need right now.John McCall2010-06-032-0/+48
| | | | | | | | This is required in order to test: The ASTImporter should set base classes after formally entering the definition. llvm-svn: 105401
* Fix undefined behavior, noticed by GCC 4.5. Patch by Dimitry Andric!Daniel Dunbar2010-06-021-2/+3
| | | | llvm-svn: 105329
* Alter the ExternalASTSource interface to permit by-name lookups. PCH ↵John McCall2010-06-011-16/+27
| | | | | | | | | | | | | | continues to bring in the entire lookup table at once. Also, give ExternalSemaSource's vtable a home. This is important because otherwise any reference to it will cause RTTI to be emitted, and since clang is compiled with -fno-rtti, that RTTI will contain unresolved references (to ExternalASTSource's RTTI). So this change makes it possible to subclass ExternalSemaSource from projects compiled with RTTI, as long as the subclass's home is compiled with -fno-rtti. llvm-svn: 105268
* Convert DeclNodes to use TableGen.Alexis Hunt2010-05-303-2/+3
| | | | | | | | The macros required for DeclNodes use have changed to match the use of StmtNodes. The FooFirst enumerator constants have been named firstFoo to match usage elsewhere. llvm-svn: 105165
* More PowerPC paths on DarwinDouglas Gregor2010-05-291-0/+3
| | | | llvm-svn: 105084
* Add C++ include paths for Darwin PowerPCDouglas Gregor2010-05-291-0/+7
| | | | llvm-svn: 105083
* add fedora 13 paths, patch by Hendrik Richter.Chris Lattner2010-05-291-0/+4
| | | | llvm-svn: 105082
* Roll back r104941.John McCall2010-05-282-2/+0
| | | | llvm-svn: 104990
* Let the backend decide which scheduler and register allocator to use.Jakob Stoklund Olesen2010-05-281-7/+0
| | | | | | | Currently, the backend uses the same policy, but it will soon switch to -regalloc=fast for -O0. llvm-svn: 104984
* Add a new attribute on records, __attribute__((adl_invisible)), and defineJohn McCall2010-05-282-0/+2
| | | | | | | | | | | | the x86-64 __va_list_tag with this attribute. The attribute causes the affected type to behave like a fundamental type when considered by ADL. (x86-64 is the only target we currently provide with a struct-based __builtin_va_list) Fixes PR6762. llvm-svn: 104941
* Frontend: Sprinkle in some C++ header paths for ARM/Darwin. Also, don't add x86Daniel Dunbar2010-05-281-4/+19
| | | | | | | | paths on non-x86. I really detest this file. llvm-svn: 104921
* Add several more predefines from modern versions of GCC.Dan Gohman2010-05-281-0/+27
| | | | llvm-svn: 104906
OpenPOWER on IntegriCloud