summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTReader.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-01-27 19:52:33 +0000
committerDouglas Gregor <dgregor@apple.com>2012-01-27 19:52:33 +0000
commita686e1b05df915030897ec670d9cb15d2a6d0221 (patch)
tree0c45700a788869289d4dad2a57e18b4e317629bf /clang/lib/Serialization/ASTReader.cpp
parent63fe5697f4d9f760fef8ec828d535deec296d119 (diff)
downloadbcm5719-llvm-a686e1b05df915030897ec670d9cb15d2a6d0221.tar.gz
bcm5719-llvm-a686e1b05df915030897ec670d9cb15d2a6d0221.zip
Introduce module attributes into the module map grammar, along with a
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
Diffstat (limited to 'clang/lib/Serialization/ASTReader.cpp')
-rw-r--r--clang/lib/Serialization/ASTReader.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index 42a848df789..71734027bfb 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -3130,9 +3130,10 @@ ASTReader::ASTReadResult ASTReader::ReadSubmoduleBlock(ModuleFile &F) {
SubmoduleID Parent = getGlobalSubmoduleID(F, Record[1]);
bool IsFramework = Record[2];
bool IsExplicit = Record[3];
- bool InferSubmodules = Record[4];
- bool InferExplicitSubmodules = Record[5];
- bool InferExportWildcard = Record[6];
+ bool IsSystem = Record[4];
+ bool InferSubmodules = Record[5];
+ bool InferExplicitSubmodules = Record[6];
+ bool InferExportWildcard = Record[7];
Module *ParentModule = 0;
if (Parent)
@@ -3151,6 +3152,7 @@ ASTReader::ASTReadResult ASTReader::ReadSubmoduleBlock(ModuleFile &F) {
}
CurrentModule->IsFromModuleFile = true;
+ CurrentModule->IsSystem = IsSystem || CurrentModule->IsSystem;
CurrentModule->InferSubmodules = InferSubmodules;
CurrentModule->InferExplicitSubmodules = InferExplicitSubmodules;
CurrentModule->InferExportWildcard = InferExportWildcard;
OpenPOWER on IntegriCloud