aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Lex/ModuleMap.h
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-02-02 18:42:48 +0000
committerDouglas Gregor <dgregor@apple.com>2012-02-02 18:42:48 +0000
commit2f04f1843ca0ffca13b8b0d4dadd1f50dffb38b8 (patch)
treef2efcb1a10ca694d4f0e08451848f0b2a13aa649 /include/clang/Lex/ModuleMap.h
parent4f7dcdbdfc50a244c3f3ca66f15b0b39a56f8f64 (diff)
Back out my heinous hack that tricked the module generation mechanism
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149611 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/ModuleMap.h')
-rw-r--r--include/clang/Lex/ModuleMap.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/clang/Lex/ModuleMap.h b/include/clang/Lex/ModuleMap.h
index 6176ed8c30..85740816d1 100644
--- a/include/clang/Lex/ModuleMap.h
+++ b/include/clang/Lex/ModuleMap.h
@@ -41,6 +41,10 @@ class ModuleMap {
const LangOptions &LangOpts;
const TargetInfo *Target;
+ /// \brief The directory used for Clang-supplied, builtin include headers,
+ /// such as "stdint.h".
+ const DirectoryEntry *BuiltinIncludeDir;
+
/// \brief Language options used to parse the module map itself.
///
/// These are always simple C language options.
@@ -102,6 +106,12 @@ public:
/// \brief Set the target information.
void setTarget(const TargetInfo &Target);
+ /// \brief Set the directory that contains Clang-supplied include
+ /// files, such as our stdarg.h or tgmath.h.
+ void setBuiltinIncludeDir(const DirectoryEntry *Dir) {
+ BuiltinIncludeDir = Dir;
+ }
+
/// \brief Retrieve the module that owns the given header file, if any.
///
/// \param File The header file that is likely to be included.