Rename "build configurations" to "conditional compilation blocks".

...because "build configuration" is already the name of an Xcode feature.

- '#if' et al are "conditional compilation directives".
- The condition is a "conditional compilation expression", or just
  "condition" if it's obvious.
- The predicates are "platform conditions" (including 'swift(>=...)')
- The options set with -D are "custom conditional compilation flags".
  (Thanks, Kevin!)

I left "IfConfigDecl" as is, as well as SourceKit's various "BuildConfig"
settings because some of them are part of the SourceKit request format.
We can change these in follow-up commits, or not.

rdar://problem/19812930
This commit is contained in:
Jordan Rose
2016-02-12 11:09:26 -08:00
parent f7def54243
commit 6272941c5c
34 changed files with 328 additions and 298 deletions

View File

@@ -81,8 +81,9 @@ findModule(ASTContext &ctx, AccessPathElem moduleID,
// FIXME: Which name should we be using here? Do we care about CPU subtypes?
// FIXME: At the very least, don't hardcode "arch".
llvm::SmallString<16> archFile(ctx.LangOpts.getTargetConfigOption("arch"));
llvm::SmallString<16> archDocFile(ctx.LangOpts.getTargetConfigOption("arch"));
llvm::SmallString<16> archFile{
ctx.LangOpts.getPlatformConditionValue("arch")};
llvm::SmallString<16> archDocFile{archFile};
if (!archFile.empty()) {
archFile += '.';
archFile += SERIALIZED_MODULE_EXTENSION;