Commit Graph

158 Commits

Author SHA1 Message Date
Douglas Gregor 09fe1bb696 Actually free memory for the module maps
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144880 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-17 02:05:44 +00:00
Douglas Gregor 2821c7f887 When we're loading a framework header, first try to turn the framework
into a module. This module can either be loaded from a module map in
the framework directory (which isn't quite working yet) or inferred
from an umbrella header (which does work, and replaces the existing
hack).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144877 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-17 01:41:17 +00:00
Douglas Gregor adb979924a A module with an umbrella header assumes that all of the headers in
the umbrella header's directory and its subdirectories are part of the
module (that's why it's an umbrella). Make sure that these headers are
considered to be part of the module for lookup purposes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144859 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-16 23:02:25 +00:00
Benjamin Kramer c96c7218b9 Silence unused variable warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144500 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-13 16:52:09 +00:00
Douglas Gregor 484535e45b Teach the search for modules to consider modules described by a module
map, so long as they have an umbrella header. This makes it possible
to introduce a module map + umbrella header for a given set of
headers, to turn it into a module.

There are two major deficiencies here: first, we don't go hunting for
module map files when we just see a module import (so we won't know
about the modules described therein). Second, we don't yet have a way
to build modules that don't have umbrella headers, or have incomplete
umbrella headers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144424 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-11 23:20:24 +00:00
Douglas Gregor 65f3b5e990 Wire up the mapping from header files mentioned in module maps over to
the corresponding (top-level) modules. This isn't actually useful yet,
because we don't yet have a way to build modules out of module maps.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144410 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-11 22:18:48 +00:00
Douglas Gregor 8b6d3deb5a Resolve the header files named in module map "header" and "umbrella"
declarations to actual files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144408 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-11 21:55:48 +00:00
Douglas Gregor a30cfe5026 Introduce basic support for parsing module map files.
Module map files provide a way to map between headers and modules, so
that we can layer a module system on top of existing headers without
changing those headers at all.

This commit introduces the module map file parser and the module map
that it generates, and wires up the module map file parser so that
we'll automatically find module map files as part of header
search. Note that we don't yet use the information stored in the
module map.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144402 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-11 19:10:28 +00:00