summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/Sema.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2018-09-15 01:21:15 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2018-09-15 01:21:15 +0000
commitd6509cf21dd017392f82da0eb9b0345fbfc8970b (patch)
tree2b3223d4aabe04fc1205a9e2158019bd3c87275b /clang/lib/Sema/Sema.cpp
parent66f3dc031d7922cb87b115ce8e5ca38db67aadd2 (diff)
downloadbcm5719-llvm-d6509cf21dd017392f82da0eb9b0345fbfc8970b.tar.gz
bcm5719-llvm-d6509cf21dd017392f82da0eb9b0345fbfc8970b.zip
[modules] Frontend support for building a header module from a list of
headaer files. llvm-svn: 342304
Diffstat (limited to 'clang/lib/Sema/Sema.cpp')
-rw-r--r--clang/lib/Sema/Sema.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp
index 82a04e1070d..4b0e69c7f65 100644
--- a/clang/lib/Sema/Sema.cpp
+++ b/clang/lib/Sema/Sema.cpp
@@ -977,7 +977,8 @@ void Sema::ActOnEndOfTranslationUnit() {
// module declaration by now.
if (getLangOpts().getCompilingModule() ==
LangOptions::CMK_ModuleInterface &&
- ModuleScopes.back().Module->Kind != Module::ModuleInterfaceUnit) {
+ (ModuleScopes.empty() ||
+ ModuleScopes.back().Module->Kind != Module::ModuleInterfaceUnit)) {
// FIXME: Make a better guess as to where to put the module declaration.
Diag(getSourceManager().getLocForStartOfFile(
getSourceManager().getMainFileID()),
OpenPOWER on IntegriCloud