summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/FrontendActions.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* When building a module from the command line via -emit-module, add an entry toRichard Smith2014-03-051-1/+9
| | | | | | | the module build stack for the module being built, so we can correctly detect recursive module builds. llvm-svn: 203006
* Add [extern_c] attribute for modules, allowing a C module to be imported ↵Richard Smith2014-03-021-7/+14
| | | | | | within an extern "C" block in C++ code. llvm-svn: 202615
* Update for llvm api change.Rafael Espindola2014-02-241-1/+1
| | | | llvm-svn: 202053
* Don't assume that F_None is the default. It is about to change.Rafael Espindola2014-02-241-1/+1
| | | | llvm-svn: 202040
* Stat system dependencies when using -verify-pchBen Langmuir2014-02-071-5/+16
| | | | | | | | We don't stat the system headers to check for stalenes during regular PCH loading for performance reasons. When explicitly saying -verify-pch, we want to check all the dependencies - user or system. llvm-svn: 200979
* Add a CC1 option -verify-pchBen Langmuir2014-02-051-0/+13
| | | | | | | | | This option will: - load the given pch file - verify it is not out of date by stat'ing dependencies, and - return 0 on success and non-zero on error llvm-svn: 200884
* Remove the -cxx-abi command-line flag.Hans Wennborg2014-01-141-1/+0
| | | | | | | | | | | | | | | This makes the C++ ABI depend entirely on the target: MS ABI for -win32 triples, Itanium otherwise. It's no longer possible to do weird combinations. To be able to run a test with a specific ABI without constraining it to a specific triple, new substitutions are added to lit: %itanium_abi_triple and %ms_abi_triple can be used to get the current target triple adjusted to the desired ABI. For example, if the test suite is running with the i686-pc-win32 target, %itanium_abi_triple will expand to i686-pc-mingw32. Differential Revision: http://llvm-reviews.chandlerc.com/D2545 llvm-svn: 199250
* Modules: Don't warn upon missing headers while reading the module map.Daniel Jasper2013-12-171-4/+11
| | | | | | | | | | | | | | | Instead, mark the module as unavailable so that clang errors as soon as someone tries to build this module. This works towards the long-term goal of not stat'ing the header files at all while reading the module map and instead read them only when the module is being built (there is a corresponding FIXME in parseHeaderDecl()). However, it seems non-trivial to get there and this unblock us and moves us into the right direction. Also changed the implementation to reuse the same DiagnosticsEngine. llvm-svn: 197485
* Fix a tranche of comment, test and doc typosAlp Toker2013-12-051-1/+1
| | | | llvm-svn: 196510
* Revert r196372, "do not warn about unknown pragmas in modes that do not ↵NAKAMURA Takumi2013-12-041-1/+1
| | | | | | | | handle them (pr9537)" It broke clang tests on some hosts with +Asserts. Seems "STDC" clashes. llvm-svn: 196376
* do not warn about unknown pragmas in modes that do not handle them (pr9537)Lubos Lunak2013-12-041-1/+1
| | | | | | | And refactor to have just one place in code that sets up the empty pragma handlers. llvm-svn: 196372
* Allow a new syntax in a module requires-declaration:Richard Smith2013-10-281-3/+3
| | | | | | | | | | | | requires ! feature The purpose of this is to allow (for instance) the module map for /usr/include to exclude <tgmath.h> and <complex.h> when building in C++ (these headers are instead provided by the C++ standard library in this case, and the glibc C <tgmath.h> header would otherwise try to include <complex.h>, resulting in a module cycle). llvm-svn: 193549
* Remove -ast-dump-xml.Richard Smith2013-10-071-11/+0
| | | | llvm-svn: 192131
* Add -ast-dump-lookups switch to -cc1 to dump DeclContext lookup maps. Test toRichard Smith2013-06-241-1/+2
| | | | | | follow. llvm-svn: 184678
* [Modules] If a module map resides in a system header directory, treat it as ↵Douglas Gregor2013-06-211-1/+1
| | | | | | | | | a system module. This prevents -pedantic from causing warnings in the system headers used to create modules. Fixes <rdar://problem/14201171>. llvm-svn: 184560
* This patch adds new private headers to the module map. PrivateLawrence Crowl2013-06-201-2/+3
| | | | | | | headers may be included from within the module, but not from outside the module. llvm-svn: 184471
* <rdar://problem/13509689> Introduce -module-file-info option that provides ↵Douglas Gregor2013-03-271-0/+125
| | | | | | | | | | | information about a particular module file. This option can be useful for end users who want to know why they ended up with a ton of different variants of the "std" module in their module cache. This problem should go away over time, as we reduce the need for module variants, but it will never go away entirely. llvm-svn: 178148
* [Modules] Resolve top-headers of modules lazily.Argyrios Kyrtzidis2013-03-131-3/+3
| | | | | | | | | | | This allows resolving top-header filenames of modules to FileEntries when we need them, not eagerly. Note that that this breaks ABI for libclang functions clang_Module_getTopLevelHeader / clang_Module_getNumTopLevelHeaders but this is fine because they are experimental and not widely used yet. llvm-svn: 176975
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-4/+4
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. llvm-svn: 169237
* [modules] Use a memory buffer directly as input for the module includes,Argyrios Kyrtzidis2012-11-151-13/+5
| | | | | | instead of messing with virtual files. llvm-svn: 168062
* [modules] Consistently construct a buffer as input to build the module.Argyrios Kyrtzidis2012-10-101-82/+42
| | | | | | This means the main file for modules will always be a virtual one. llvm-svn: 165591
* [Modules] Introduce Module::TopHeaders which is a set of top-level headersArgyrios Kyrtzidis2012-10-051-3/+8
| | | | | | that are associated with a (sub)module. llvm-svn: 165279
* Added -ast-list option to dump filterable AST decl node names.Alexander Kornienko2012-07-311-0/+5
| | | | llvm-svn: 161040
* Added -ast-dump-filter option to clang -cc1.Alexander Kornienko2012-07-261-2/+2
| | | | llvm-svn: 160784
* Documentation cleanup: escape # in a Doxygen comment.James Dennett2012-06-151-1/+1
| | | | llvm-svn: 158554
* Remove the -cc1-level option "-pubnames-dump". Such things should stayDouglas Gregor2012-04-131-72/+0
| | | | | | out of the tree and use the tooling infrastructure. llvm-svn: 154668
* Introduce a -cc1-level option -pubnames-dump, which simply dumps theDouglas Gregor2012-03-271-0/+72
| | | | | | | | list of identifiers that that 'public' names at the end of the translation unit, e.g., defined macros or identifiers with top-level names, in sorted order. Meant to support <rdar://problem/10921596>. llvm-svn: 153522
* Unify naming of LangOptions variable/get function across the Clang stack ↵David Blaikie2012-03-111-1/+1
| | | | | | | | | | (Lex to AST). The member variable is always "LangOpts" and the member function is always "getLangOpts". Reviewed by Chris Lattner llvm-svn: 152536
* Frontend: Don't automatically create missing directories when using ↵Daniel Dunbar2012-03-031-1/+2
| | | | | | | | temporary files with createOutputFile() - This would otherwise happen as a side effect of llvm::sys::fs::unique_file creating parent directories. llvm-svn: 151960
* Basic: import SmallString<> into clang namespaceDylan Noblesmith2012-02-051-6/+6
| | | | | | | (I was going to fix the TODO about DenseMap too, but that would break self-host right now. See PR11922.) llvm-svn: 149799
* Back out my heinous hack that tricked the module generation mechanismDouglas Gregor2012-02-021-39/+26
| | | | | | | | | | | | | | | | | | | | into using non-absolute system includes (<foo>)... ... and introduce another hack that is simultaneously more heineous and more effective. We whitelist Clang-supplied headers that augment or override system headers (such as float.h, stdarg.h, and tgmath.h). For these headers, Clang does not provide a module mapping. Instead, a system-supplied module map can refer to these headers in a system module, and Clang will look both in its own include directory and wherever the system-supplied module map suggests, then adds either or both headers. The end result is that Clang-supplied headers get merged into the system-supplied module for the C standard library. As a drive-by, fix up a few dependencies in the _Builtin_instrinsics module. llvm-svn: 149611
* Split compiler builtin module into "stdlib" builtins and "intrinsic"Douglas Gregor2012-01-311-26/+39
| | | | | | | | builds, and bring mm_alloc.h into the fold. Start playing some tricks with these builtin modules to mirror the include_next tricks that the headers already perform. llvm-svn: 149434
* Thread a TargetInfo through to the module map; we'll need it forDouglas Gregor2012-01-301-1/+1
| | | | | | target-specific module requirements. llvm-svn: 149224
* Rework HeaderSearch's interface for getting a module from a name andDouglas Gregor2012-01-291-1/+2
| | | | | | | | | for getting the name of the module file, unifying the code for searching for a module with a given name (into lookupModule()) and separating out the mapping to a module file (into getModuleFileName()). No functionality change. llvm-svn: 149197
* Introduce module attributes into the module map grammar, along with aDouglas Gregor2012-01-271-2/+4
| | | | | | | | | | | | | single attribute ("system") that allows us to mark a module as being a "system" module. Each of the headers that makes up a system module is considered to be a system header, so that we (for example) suppress warnings there. If a module is being inferred for a framework, and that framework directory is within a system frameworks directory, infer it as a system framework. llvm-svn: 149143
* Extract the (InputKind, std::string) pair used to describe inputs toDouglas Gregor2012-01-201-4/+4
| | | | | | | the front end into its own class, FrontendInputFile, to make it easier to introduce new per-input data. No functionality change. llvm-svn: 148546
* When generating includes for all of the headers we found in anDouglas Gregor2012-01-051-3/+13
| | | | | | | umbrella directory, skip includes for any headers that are part of an unavailable module. llvm-svn: 147572
* Store the submodules of a module in source order, as they are storedDouglas Gregor2012-01-041-4/+3
| | | | | | | | in the module map. This provides a bit more predictability for the user, as well as eliminating the need to sort the submodules when serializing them. llvm-svn: 147564
* Implement support for module requirements, which indicate the languageDouglas Gregor2011-12-311-1/+15
| | | | | | | | | features needed for a particular module to be available. This allows mixed-language modules, where certain headers only work under some language variants (e.g., in C++, std.tuple might only be available in C++11 mode). llvm-svn: 147387
* When we have an umbrella directory in a module map, recursively walkDouglas Gregor2011-12-121-1/+2
| | | | | | the subdirectories to find headers in submodules. llvm-svn: 146398
* Implement umbrella directories for modules, which are similar toDouglas Gregor2011-12-081-0/+23
| | | | | | | | | | | | | | | umbrella headers in the sense that all of the headers within that directory (and eventually its subdirectories) are considered to be part of the module with that umbrella directory. However, unlike umbrella headers, which are expected to include all of the headers within their subdirectories, Clang will automatically include all of the headers it finds in the named subdirectory. The intent here is to allow a module map to trivially turn a subdirectory into a module, where the module's structure can mimic the directory structure. llvm-svn: 146165
* Within the module representation, generalize the notion of an umbrellaDouglas Gregor2011-12-081-15/+20
| | | | | | | | | | header to also support umbrella directories. The umbrella directory for an umbrella header is the directory in which the umbrella header resides. No functionality change yet, but it's coming. llvm-svn: 146158
* When building the main file to parse given a module map, don't skipDouglas Gregor2011-12-061-19/+24
| | | | | | | | explicit submodules or umbrella headers from submodules. Instead, build the entire module at once, and let the name-hiding mechanisms hide the contents of explicit submodules at load time. llvm-svn: 145940
* Promote ModuleMap::Module to a namespace-scope class in the BasicDouglas Gregor2011-11-301-2/+2
| | | | | | | | | library, since modules cut across all of the libraries. Rename serialization::Module to serialization::ModuleFile to side-step the annoying naming conflict. Prune a bunch of ModuleMap.h includes that are no longer needed (most files only needed the Module type). llvm-svn: 145538
* When writing a module file, pass the module through to the ASTDouglas Gregor2011-11-301-5/+3
| | | | | | writer. No functionality change. llvm-svn: 145479
* Eliminate the -emit-module option, which emitted a module by parsing aDouglas Gregor2011-11-291-1/+1
| | | | | | | source file (e.g., a header). Immediately steal this useful option name for building modules from a module map file. llvm-svn: 145444
* When building a module from a module map that isn't simply an umbrellaDouglas Gregor2011-11-161-9/+95
| | | | | | | | header, create our own in-memory buffer to parse all of the appropriate headers, and use that to build the module. This isn't end-to-end testable yet; that's coming next. llvm-svn: 144797
* Switch some more of the modules tests over to "-emit-module-from-map",Douglas Gregor2011-11-161-2/+0
| | | | | | and remove stray fprintf. llvm-svn: 144742
* Add support for building a module from a module map to the -cc1Douglas Gregor2011-11-161-0/+93
| | | | | | | interface. This is currently limited to modules with umbrella headers. llvm-svn: 144736
* Revert r144703. It was a dumb idea anyway; will add the new bits moreDouglas Gregor2011-11-151-39/+1
| | | | | | incrementally with a new frontend action. llvm-svn: 144723
OpenPOWER on IntegriCloud