projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b464f2
)
[modules] Don't bother creating a global module fragment when building a
author
Richard Smith
<richard-llvm@metafoo.co.uk>
Sat, 15 Sep 2018 01:59:39 +0000
(
01:59
+0000)
committer
Richard Smith
<richard-llvm@metafoo.co.uk>
Sat, 15 Sep 2018 01:59:39 +0000
(
01:59
+0000)
header module.
llvm-svn: 342307
clang/lib/Sema/Sema.cpp
patch
|
blob
|
history
diff --git
a/clang/lib/Sema/Sema.cpp
b/clang/lib/Sema/Sema.cpp
index
4b0e69c
..
d777afe
100644
(file)
--- a/
clang/lib/Sema/Sema.cpp
+++ b/
clang/lib/Sema/Sema.cpp
@@
-827,7
+827,9
@@
void Sema::emitAndClearUnusedLocalTypedefWarnings() {
/// is parsed. Note that the ASTContext may have already injected some
/// declarations.
void Sema::ActOnStartOfTranslationUnit() {
- if (getLangOpts().ModulesTS) {
+ if (getLangOpts().ModulesTS &&
+ (getLangOpts().getCompilingModule() == LangOptions::CMK_ModuleInterface ||
+ getLangOpts().getCompilingModule() == LangOptions::CMK_None)) {
SourceLocation StartOfTU =
SourceMgr.getLocForStartOfFile(SourceMgr.getMainFileID());