aboutsummaryrefslogtreecommitdiff
path: root/Driver/clang.cpp
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2009-01-30 08:22:07 +0000
committerMike Stump <mrs@apple.com>2009-01-30 08:22:07 +0000
commitb55cc635f545de2ed23a8f81b45b55b89a4ee3ef (patch)
treead9cdd0f173803a4a0c8f413f8fbb9794a588fc6 /Driver/clang.cpp
parent8562ae74ae0ff0a64b46ef5ebea8e7ce0f76fa00 (diff)
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
Diffstat (limited to 'Driver/clang.cpp')
-rw-r--r--Driver/clang.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/Driver/clang.cpp b/Driver/clang.cpp
index 4e79733043..b16a836571 100644
--- a/Driver/clang.cpp
+++ b/Driver/clang.cpp
@@ -486,7 +486,10 @@ LaxVectorConversions("flax-vector-conversions",
" with a different number of elements or "
"different element types"));
static llvm::cl::opt<bool>
-EnableBlocks("fblocks", llvm::cl::desc("enable the 'blocks' language feature"));
+EnableBlocks("fblocks", llvm::cl::desc("enable the 'blocks' language feature"), llvm::cl::ValueDisallowed);
+
+static llvm::cl::inverse_opt
+DisableBlocks("fno-blocks", llvm::cl::opposite_of(EnableBlocks), llvm::cl::ValueDisallowed);
static llvm::cl::opt<bool>
ObjCNonFragileABI("fobjc-nonfragile-abi", llvm::cl::desc("enable objective-c's nonfragile abi"));
@@ -614,7 +617,7 @@ static void InitializeLanguageStandard(LangOptions &Options, LangKind LK,
Options.WritableStrings = WritableStrings;
Options.LaxVectorConversions = LaxVectorConversions;
Options.Exceptions = Exceptions;
- if (EnableBlocks.getPosition())
+ if (EnableBlocks.getPosition() || DisableBlocks.getPosition())
Options.Blocks = EnableBlocks;
// Override the default runtime if the user requested it.