diff options
author | Eric Christopher <echristo@gmail.com> | 2015-08-25 13:45:24 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2015-08-25 13:45:24 +0000 |
commit | 6b45437f6f69b99306bced83f9178705e75c8495 (patch) | |
tree | 0081feff42b7e741c17e7be6a272bde01ed1cfcd /clang/lib/Basic/Targets.cpp | |
parent | af642c692726314ae0a6cbe6466c726ed17c10c1 (diff) | |
download | bcm5719-llvm-6b45437f6f69b99306bced83f9178705e75c8495.tar.gz bcm5719-llvm-6b45437f6f69b99306bced83f9178705e75c8495.zip |
Extract handling of user defined features into a function so we can
specialize it on the targets.
llvm-svn: 245935
Diffstat (limited to 'clang/lib/Basic/Targets.cpp')
-rw-r--r-- | clang/lib/Basic/Targets.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp index b78e2817f0e..5c4a016b554 100644 --- a/clang/lib/Basic/Targets.cpp +++ b/clang/lib/Basic/Targets.cpp @@ -7565,12 +7565,8 @@ TargetInfo::CreateTargetInfo(DiagnosticsEngine &Diags, Target->initDefaultFeatures(Features); // Apply the user specified deltas. - for (const auto &F : Opts->FeaturesAsWritten) { - const char *Name = F.c_str(); - // Apply the feature via the target. - bool Enabled = Name[0] == '+'; - Target->setFeatureEnabled(Features, Name + 1, Enabled); - } + if (!Target->handleUserFeatures(Features, Opts->FeaturesAsWritten, Diags)) + return nullptr; // Add the features to the compile options. // |