aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-10-18 22:49:46 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-10-18 22:49:46 +0000
commit25b26ebdebe46bb4576247e0c64d1c11410a8e9d (patch)
tree5811b09faf0ce1520e1066f02aee4c30bef63237 /lib/Driver/Tools.cpp
parentfcec10bded7b9b9268af5232fa17617db0df68ed (diff)
Driver: Reject -fasm-blocks except on X86 (where we just ignore it, since
passing it is very prevalent in some circles). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116761 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r--lib/Driver/Tools.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 6e221b4c83..7924a034df 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -1469,6 +1469,18 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
options::OPT_fno_spell_checking))
CmdArgs.push_back("-fno-spell-checking");
+
+ // -fasm-blocks is disallowed except on X86, where we just ignore it.
+ if (Args.hasFlag(options::OPT_fasm_blocks, options::OPT_fno_asm_blocks,
+ false)) {
+ if (getToolChain().getTriple().getArch() != llvm::Triple::x86 &&
+ getToolChain().getTriple().getArch() != llvm::Triple::x86_64)
+ D.Diag(clang::diag::err_drv_clang_unsupported_per_platform)
+ << "-fasm-blocks";
+ }
+
+ // -fasm-blocks is disallowed except on X86, where we just ignore it.
+
if (Arg *A = Args.getLastArg(options::OPT_fshow_overloads_EQ))
A->render(Args, CmdArgs);
@@ -1577,7 +1589,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
(*it)->claim();
D.Diag(clang::diag::warn_drv_clang_unsupported) << (*it)->getAsString(Args);
}
-
+
// Claim some arguments which clang supports automatically.
// -fpch-preprocess is used with gcc to add a special marker in the output to