[cfe-commits] r134082 - in /cfe/trunk: include/clang/Basic/LangOptions.h include/clang/Driver/CC1Options.td include/clang/Driver/Options.td lib/CodeGen/CGBlocks.cpp lib/Driver/Tools.cpp lib/Frontend/CompilerInvocation.cpp test/CodeGen/reset-local-block.c
Fariborz Jahanian
fjahanian at apple.com
Wed Jun 29 11:41:17 PDT 2011
Author: fjahanian
Date: Wed Jun 29 13:41:17 2011
New Revision: 134082
URL: http://llvm.org/viewvc/llvm-project?rev=134082&view=rev
Log:
Use existing -fcatch-undefined-behavior option,
replacing -freset-local-blocks. // rdar://9227352
Modified:
cfe/trunk/include/clang/Basic/LangOptions.h
cfe/trunk/include/clang/Driver/CC1Options.td
cfe/trunk/include/clang/Driver/Options.td
cfe/trunk/lib/CodeGen/CGBlocks.cpp
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/lib/Frontend/CompilerInvocation.cpp
cfe/trunk/test/CodeGen/reset-local-block.c
Modified: cfe/trunk/include/clang/Basic/LangOptions.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/LangOptions.h?rev=134082&r1=134081&r2=134082&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/LangOptions.h (original)
+++ cfe/trunk/include/clang/Basic/LangOptions.h Wed Jun 29 13:41:17 2011
@@ -72,7 +72,6 @@
unsigned POSIXThreads : 1; // Compiling with POSIX thread support
// (-pthread)
unsigned Blocks : 1; // block extension to C
- unsigned ResetLocalBlocks : 1; // reset local blocks going out of scope
unsigned EmitAllDecls : 1; // Emit all declarations, even if
// they are unused.
unsigned MathErrno : 1; // Math functions must respect errno
@@ -199,7 +198,7 @@
ThreadsafeStatics = 1;
POSIXThreads = 0;
- Blocks = ResetLocalBlocks = 0;
+ Blocks = 0;
EmitAllDecls = 0;
MathErrno = 1;
SignedOverflowBehavior = SOB_Undefined;
Modified: cfe/trunk/include/clang/Driver/CC1Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CC1Options.td?rev=134082&r1=134081&r2=134082&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/CC1Options.td (original)
+++ cfe/trunk/include/clang/Driver/CC1Options.td Wed Jun 29 13:41:17 2011
@@ -444,8 +444,6 @@
HelpText<"Emit all declarations, even if unused">;
def fblocks : Flag<"-fblocks">,
HelpText<"enable the 'blocks' language feature">;
-def freset_local_blocks : Flag<"-freset-local-blocks">,
- HelpText<"reset local blocks when they go out of scope">;
def fheinous_gnu_extensions : Flag<"-fheinous-gnu-extensions">;
def fexceptions : Flag<"-fexceptions">,
HelpText<"Enable support for exception handling">;
Modified: cfe/trunk/include/clang/Driver/Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=134082&r1=134081&r2=134082&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Options.td (original)
+++ cfe/trunk/include/clang/Driver/Options.td Wed Jun 29 13:41:17 2011
@@ -259,7 +259,6 @@
def fast : Flag<"-fast">, Group<f_Group>;
def fasynchronous_unwind_tables : Flag<"-fasynchronous-unwind-tables">, Group<f_Group>;
def fblocks : Flag<"-fblocks">, Group<f_Group>;
-def freset_local_blocks : Flag<"-freset-local-blocks">, Group<f_Group>;
def fbootclasspath_EQ : Joined<"-fbootclasspath=">, Group<f_Group>;
def fborland_extensions : Flag<"-fborland-extensions">, Group<f_Group>;
def fbuiltin_strcat : Flag<"-fbuiltin-strcat">, Group<f_Group>;
Modified: cfe/trunk/lib/CodeGen/CGBlocks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBlocks.cpp?rev=134082&r1=134081&r2=134082&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGBlocks.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGBlocks.cpp Wed Jun 29 13:41:17 2011
@@ -665,7 +665,7 @@
llvm::Value *result =
Builder.CreateBitCast(blockAddr,
ConvertType(blockInfo.getBlockExpr()->getType()));
- if (getLangOptions().ResetLocalBlocks)
+ if (getLangOptions().CatchUndefined)
EHStack.pushCleanup<CallMemsetLocalBlockObject>(NormalCleanup, blockAddr,
blockInfo.BlockSize);
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=134082&r1=134081&r2=134082&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Wed Jun 29 13:41:17 2011
@@ -1709,8 +1709,6 @@
!Args.hasArg(options::OPT_fno_blocks))) {
CmdArgs.push_back("-fblocks");
}
- if (Args.hasArg(options::OPT_freset_local_blocks))
- CmdArgs.push_back("-freset-local-blocks");
// -faccess-control is default.
if (Args.hasFlag(options::OPT_fno_access_control,
Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=134082&r1=134081&r2=134082&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Wed Jun 29 13:41:17 2011
@@ -638,8 +638,6 @@
Res.push_back("-pthread");
if (Opts.Blocks)
Res.push_back("-fblocks");
- if (Opts.ResetLocalBlocks)
- Res.push_back("-freset-local-blocks");
if (Opts.EmitAllDecls)
Res.push_back("-femit-all-decls");
if (Opts.MathErrno)
@@ -1614,7 +1612,6 @@
Opts.RTTI = !Args.hasArg(OPT_fno_rtti);
Opts.Blocks = Args.hasArg(OPT_fblocks);
- Opts.ResetLocalBlocks = Args.hasArg(OPT_freset_local_blocks);
Opts.CharIsSigned = !Args.hasArg(OPT_fno_signed_char);
Opts.ShortWChar = Args.hasArg(OPT_fshort_wchar);
Opts.ShortEnums = Args.hasArg(OPT_fshort_enums);
Modified: cfe/trunk/test/CodeGen/reset-local-block.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/reset-local-block.c?rev=134082&r1=134081&r2=134082&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/reset-local-block.c (original)
+++ cfe/trunk/test/CodeGen/reset-local-block.c Wed Jun 29 13:41:17 2011
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fblocks -freset-local-blocks -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fblocks -fcatch-undefined-behavior -o - %s | FileCheck %s
// rdar://9227352
typedef int (^BLOCK)();
More information about the cfe-commits
mailing list