Add -fno-blocks support. This fixes block-no-block-def.c.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63385 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/ccc/ccclib/Tools.py b/tools/ccc/ccclib/Tools.py
index 6156684c..a86ab9b 100644
--- a/tools/ccc/ccclib/Tools.py
+++ b/tools/ccc/ccclib/Tools.py
@@ -305,8 +305,7 @@
cmd_args.append('-token-cache')
cmd_args.append(pthPath)
- # FIXME: Dehardcode this.
- cmd_args.append('-fblocks')
+ arglist.addAllArgs(cmd_args, arglist.parser.fblocksGroup)
arglist.addAllArgs(cmd_args, arglist.parser.OOption)
arglist.addAllArgs2(cmd_args, arglist.parser.ClangWGroup, arglist.parser.pedanticGroup)
@@ -466,6 +465,7 @@
# ccc treats -fsyntax-only specially.
arglist.addAllArgs2(cmd_args, arglist.parser.fGroup,
arglist.parser.syntaxOnlyOption)
+ arglist.addAllArgs(cmd_args, arglist.parser.fblocksGroup)
arglist.addAllArgs(cmd_args, arglist.parser.undefOption)
if arglist.getLastArg(arglist.parser.QnOption):
@@ -538,6 +538,7 @@
# ccc treats -fsyntax-only specially.
arglist.addAllArgs2(cmd_args, arglist.parser.fGroup,
arglist.parser.syntaxOnlyOption)
+ arglist.addAllArgs(cmd_args, arglist.parser.fblocksGroup)
if (arglist.getLastArg(arglist.parser.gGroup) and
not arglist.getLastArg(arglist.parser.g0Option) and