summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/Module.cpp
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2017-05-27 02:46:17 +0000
committerEric Fiselier <eric@efcs.ca>2017-05-27 02:46:17 +0000
commit0bb3bcd0ef969bd3a3fb37826a0f8645d2795b96 (patch)
tree5a441fcdade31181f2f99441f19d3c73393df13e /clang/lib/Basic/Module.cpp
parentcbc82b3ca93d845daaceff035aff252cea5e753e (diff)
downloadbcm5719-llvm-0bb3bcd0ef969bd3a3fb37826a0f8645d2795b96.tar.gz
bcm5719-llvm-0bb3bcd0ef969bd3a3fb37826a0f8645d2795b96.zip
[coroutines] Support "coroutines" feature in module map requires clause
Summary: In order for libc++ to add `<experimental/coroutine>` to its module map, there has to be a feature that can be used to detect if coroutines support is enabled in Clang. Reviewers: rsmith Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33538 llvm-svn: 304054
Diffstat (limited to 'clang/lib/Basic/Module.cpp')
-rw-r--r--clang/lib/Basic/Module.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Basic/Module.cpp b/clang/lib/Basic/Module.cpp
index a6fd931cb17..ac3d7c55967 100644
--- a/clang/lib/Basic/Module.cpp
+++ b/clang/lib/Basic/Module.cpp
@@ -64,6 +64,7 @@ static bool hasFeature(StringRef Feature, const LangOptions &LangOpts,
bool HasFeature = llvm::StringSwitch<bool>(Feature)
.Case("altivec", LangOpts.AltiVec)
.Case("blocks", LangOpts.Blocks)
+ .Case("coroutines", LangOpts.CoroutinesTS)
.Case("cplusplus", LangOpts.CPlusPlus)
.Case("cplusplus11", LangOpts.CPlusPlus11)
.Case("freestanding", LangOpts.Freestanding)
OpenPOWER on IntegriCloud