diff options
author | Steven Wu <stevenwu@apple.com> | 2015-01-16 23:05:28 +0000 |
---|---|---|
committer | Steven Wu <stevenwu@apple.com> | 2015-01-16 23:05:28 +0000 |
commit | cb0d13fc2337966a7e8738082309be1e215f83f3 (patch) | |
tree | 9c127e06ea4c5d5e9606a4d2c4f3808767face49 /clang/lib/Driver/Tools.cpp | |
parent | a34d04d35e72c9104c32e2f772b8bccab7f0cd33 (diff) | |
download | llvm-cb0d13fc2337966a7e8738082309be1e215f83f3.zip llvm-cb0d13fc2337966a7e8738082309be1e215f83f3.tar.gz llvm-cb0d13fc2337966a7e8738082309be1e215f83f3.tar.bz2 |
Adding option -fno-inline-asm to disallow inline asm
Summary:
This patch add a new option to dis-allow all inline asm.
Any GCC style inline asm will be reported as an error.
Reviewers: rnk, echristo
Reviewed By: rnk, echristo
Subscribers: bob.wilson, rnk, echristo, rsmith, cfe-commits
Differential Revision: http://reviews.llvm.org/D6870
llvm-svn: 226340
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r-- | clang/lib/Driver/Tools.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index d625c0e..db43fde 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -4320,6 +4320,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, false)) CmdArgs.push_back("-fasm-blocks"); + // -fgnu-inline-asm is default. + if (!Args.hasFlag(options::OPT_fgnu_inline_asm, + options::OPT_fno_gnu_inline_asm, true)) + CmdArgs.push_back("-fno-gnu-inline-asm"); + // Enable vectorization per default according to the optimization level // selected. For optimization levels that want vectorization we use the alias // option to simplify the hasFlag logic. |