summaryrefslogtreecommitdiff
path: root/lib/Basic/Module.cpp
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2017-05-28 21:07:22 +0000
committerEric Fiselier <eric@efcs.ca>2017-05-28 21:07:22 +0000
commit384ca6f633ff738d341efbde857d66dbb10e7ab1 (patch)
tree5e83a4bef176cf765326dae6d56a696cc132289e /lib/Basic/Module.cpp
parent1995be1cfda3ccb67b987f449b6c25c728cccc9f (diff)
downloadclang-384ca6f633ff738d341efbde857d66dbb10e7ab1.tar.gz
[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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304107 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/Module.cpp')
-rw-r--r--lib/Basic/Module.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Basic/Module.cpp b/lib/Basic/Module.cpp
index a6fd931cb1..ac3d7c5596 100644
--- a/lib/Basic/Module.cpp
+++ b/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)