[llvm-commits] [llvm-gcc-4.2] r118768 - in /llvm-gcc-4.2/trunk/gcc: c-opts.c calls.c common.opt config/arm/darwin.h config/darwin.h cp/decl.c cp/init.c dwarf2out.c function.c opts.c tree-eh.c tree-ssa-math-opts.c
Dale Johannesen
dalej at apple.com
Wed Nov 10 17:59:08 PST 2010
Author: johannes
Date: Wed Nov 10 19:59:08 2010
New Revision: 118768
URL: http://llvm.org/viewvc/llvm-project?rev=118768&view=rev
Log:
Revert 118750, which broke FrontendC/2008-04-08-NoExceptions.c.
As I understand the point of the patch this test should continue
to work.
Modified:
llvm-gcc-4.2/trunk/gcc/c-opts.c
llvm-gcc-4.2/trunk/gcc/calls.c
llvm-gcc-4.2/trunk/gcc/common.opt
llvm-gcc-4.2/trunk/gcc/config/arm/darwin.h
llvm-gcc-4.2/trunk/gcc/config/darwin.h
llvm-gcc-4.2/trunk/gcc/cp/decl.c
llvm-gcc-4.2/trunk/gcc/cp/init.c
llvm-gcc-4.2/trunk/gcc/dwarf2out.c
llvm-gcc-4.2/trunk/gcc/function.c
llvm-gcc-4.2/trunk/gcc/opts.c
llvm-gcc-4.2/trunk/gcc/tree-eh.c
llvm-gcc-4.2/trunk/gcc/tree-ssa-math-opts.c
Modified: llvm-gcc-4.2/trunk/gcc/c-opts.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/c-opts.c?rev=118768&r1=118767&r2=118768&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/c-opts.c (original)
+++ llvm-gcc-4.2/trunk/gcc/c-opts.c Wed Nov 10 19:59:08 2010
@@ -237,10 +237,7 @@
#endif
/* APPLE LOCAL end -Wfour-char-constants */
- /* LLVM LOCAL begin 6635085 */
- if (c_dialect_cxx() && flag_exceptions < 0)
- flag_exceptions = 1;
- /* LLVM LOCAL end 6635085 */
+ flag_exceptions = c_dialect_cxx ();
/* LLVM local begin One Definition Rule */
#ifdef ENABLE_LLVM
flag_odr = c_dialect_cxx ();
@@ -1156,10 +1153,7 @@
/* Default to ObjC sjlj exception handling if NeXT runtime. */
if (flag_objc_sjlj_exceptions < 0)
flag_objc_sjlj_exceptions = flag_next_runtime;
- /* LLVM LOCAL begin 6635085 */
- if ((flag_objc_exceptions && !flag_objc_sjlj_exceptions)
- || flag_exceptions < 0)
- /* LLVM LOCAL end 6635085 */
+ if (flag_objc_exceptions && !flag_objc_sjlj_exceptions)
flag_exceptions = 1;
/* -Wextra implies -Wsign-compare, -Wmissing-field-initializers and
Modified: llvm-gcc-4.2/trunk/gcc/calls.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/calls.c?rev=118768&r1=118767&r2=118768&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/calls.c (original)
+++ llvm-gcc-4.2/trunk/gcc/calls.c Wed Nov 10 19:59:08 2010
@@ -2384,8 +2384,6 @@
with stack pointer depressed.
Also do the adjustments before a throwing call, otherwise
exception handling can fail; PR 19225. */
- /* LLVM LOCAL 6635085 */
- gcc_assert(flag_exceptions > 0);
if (pending_stack_adjust >= 32
|| (pending_stack_adjust > 0
&& (flags & (ECF_MAY_BE_ALLOCA | ECF_SP_DEPRESSED)))
Modified: llvm-gcc-4.2/trunk/gcc/common.opt
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/common.opt?rev=118768&r1=118767&r2=118768&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/common.opt (original)
+++ llvm-gcc-4.2/trunk/gcc/common.opt Wed Nov 10 19:59:08 2010
@@ -519,7 +519,7 @@
Do not suppress C++ class debug information.
fexceptions
-Common Report Var(flag_exceptions) Init(-1)
+Common Report Var(flag_exceptions)
Enable exception handling
; APPLE LOCAL begin optimization pragmas 3124235/3420242
Modified: llvm-gcc-4.2/trunk/gcc/config/arm/darwin.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/arm/darwin.h?rev=118768&r1=118767&r2=118768&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/arm/darwin.h (original)
+++ llvm-gcc-4.2/trunk/gcc/config/arm/darwin.h Wed Nov 10 19:59:08 2010
@@ -382,9 +382,7 @@
#define OBJC_TARGET_FLAG_OBJC_ABI \
do { \
- /* LLVM LOCAL 6635085 */ \
- if (flag_objc_abi == -1 \
- && flag_exceptions == -1) \
+ if (flag_objc_abi == -1) \
flag_objc_abi = 2; \
if (flag_objc_legacy_dispatch == -1) \
flag_objc_legacy_dispatch = 1; \
Modified: llvm-gcc-4.2/trunk/gcc/config/darwin.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/darwin.h?rev=118768&r1=118767&r2=118768&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/darwin.h (original)
+++ llvm-gcc-4.2/trunk/gcc/config/darwin.h Wed Nov 10 19:59:08 2010
@@ -863,10 +863,7 @@
flag_objc_zerocost_exceptions = 1; \
if (flag_objc_zerocost_exceptions) \
{ \
- /* APPLE LOCAL begin 6635085 */ \
- if (flag_exceptions == -1) \
- flag_exceptions = 1; \
- /* APPLE LOCAL end 6635085 */ \
+ flag_exceptions = 1; \
flag_objc_sjlj_exceptions = 0; \
} \
/* APPLE LOCAL end radar 5023725 */ \
Modified: llvm-gcc-4.2/trunk/gcc/cp/decl.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/cp/decl.c?rev=118768&r1=118767&r2=118768&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/cp/decl.c (original)
+++ llvm-gcc-4.2/trunk/gcc/cp/decl.c Wed Nov 10 19:59:08 2010
@@ -1104,8 +1104,6 @@
all declarations, including the definition and an explicit
specialization, of that function shall have an
exception-specification with the same set of type-ids. */
- /* LLVM LOCAL 6635085 */
- gcc_assert(flag_exceptions >= 0);
if ((pedantic || ! DECL_IN_SYSTEM_HEADER (old_decl))
&& ! DECL_IS_BUILTIN (old_decl)
&& flag_exceptions
@@ -3395,8 +3393,7 @@
init_class_processing ();
init_rtti_processing ();
- /* LLVM LOCAL 6635085 */
- if (flag_exceptions > 0)
+ if (flag_exceptions)
init_exception_processing ();
if (! supports_one_only ())
@@ -11739,8 +11736,6 @@
static bool
use_eh_spec_block (tree fn)
{
- /* LLVM LOCAL 6635085 */
- gcc_assert(flag_exceptions >= 0);
return (flag_exceptions && flag_enforce_eh_specs
&& !processing_template_decl
&& TYPE_RAISES_EXCEPTIONS (TREE_TYPE (fn))
Modified: llvm-gcc-4.2/trunk/gcc/cp/init.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/cp/init.c?rev=118768&r1=118767&r2=118768&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/cp/init.c (original)
+++ llvm-gcc-4.2/trunk/gcc/cp/init.c Wed Nov 10 19:59:08 2010
@@ -1957,8 +1957,6 @@
unambiguous matching deallocation function can be found,
propagating the exception does not cause the object's memory to be
freed. */
- /* LLVM LOCAL 6635085 */
- gcc_assert(flag_exceptions >= 0);
if (flag_exceptions && ! use_java_new)
{
enum tree_code dcode = array_p ? VEC_DELETE_EXPR : DELETE_EXPR;
@@ -2497,8 +2495,6 @@
/* Protect the entire array initialization so that we can destroy
the partially constructed array if an exception is thrown.
But don't do this if we're assigning. */
- /* LLVM LOCAL 6635085 */
- gcc_assert(flag_exceptions >= 0);
if (flag_exceptions && TYPE_HAS_NONTRIVIAL_DESTRUCTOR (type)
&& from_array != 2)
{
@@ -2633,8 +2629,6 @@
}
/* Make sure to cleanup any partially constructed elements. */
- /* LLVM LOCAL 6635085 */
- gcc_assert(flag_exceptions >= 0);
if (flag_exceptions && TYPE_HAS_NONTRIVIAL_DESTRUCTOR (type)
&& from_array != 2)
{
Modified: llvm-gcc-4.2/trunk/gcc/dwarf2out.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/dwarf2out.c?rev=118768&r1=118767&r2=118768&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/dwarf2out.c (original)
+++ llvm-gcc-4.2/trunk/gcc/dwarf2out.c Wed Nov 10 19:59:08 2010
@@ -123,8 +123,7 @@
#ifdef DWARF2_UNWIND_INFO
|| (DWARF2_UNWIND_INFO
&& (flag_unwind_tables
- /* LLVM LOCAL 6635085 */
- || (flag_exceptions > 0 && ! USING_SJLJ_EXCEPTIONS)))
+ || (flag_exceptions && ! USING_SJLJ_EXCEPTIONS)))
#endif
);
}
@@ -2208,8 +2207,6 @@
discarded. Example where this matters: a primary function
template in C++ requires EH information, but an explicit
specialization doesn't. */
- /* LLVM LOCAL 6635085 */
- gcc_assert(flag_exceptions >= 0);
if (TARGET_USES_WEAK_UNWIND_INFO
&& ! flag_asynchronous_unwind_tables
/* APPLE LOCAL begin for-fsf-4_4 5480287 */ \
@@ -2383,8 +2380,6 @@
floor_log2 (for_eh ? PTR_SIZE : DWARF2_ADDR_SIZE));
ASM_OUTPUT_LABEL (asm_out_file, l2);
- /* LLVM LOCAL 6635085 */
- gcc_assert(flag_exceptions >= 0);
/* Loop through all of the FDE's. */
for (i = 0; i < fde_table_in_use; i++)
{
@@ -2669,8 +2664,7 @@
#ifndef TARGET_UNWIND_INFO
/* Output another copy for the unwinder. */
- /* LLVM LOCAL 6635085 */
- if (! USING_SJLJ_EXCEPTIONS && (flag_unwind_tables || flag_exceptions > 0))
+ if (! USING_SJLJ_EXCEPTIONS && (flag_unwind_tables || flag_exceptions))
output_call_frame_info (1);
#endif
}
Modified: llvm-gcc-4.2/trunk/gcc/function.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/function.c?rev=118768&r1=118767&r2=118768&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/function.c (original)
+++ llvm-gcc-4.2/trunk/gcc/function.c Wed Nov 10 19:59:08 2010
@@ -4475,8 +4475,6 @@
/* Output the label for the actual return from the function. */
emit_label (return_label);
- /* LLVM LOCAL 6635085 */
- gcc_assert(flag_exceptions > 0);
if (USING_SJLJ_EXCEPTIONS)
{
/* Let except.c know where it should emit the call to unregister
Modified: llvm-gcc-4.2/trunk/gcc/opts.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/opts.c?rev=118768&r1=118767&r2=118768&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/opts.c (original)
+++ llvm-gcc-4.2/trunk/gcc/opts.c Wed Nov 10 19:59:08 2010
@@ -736,8 +736,7 @@
generating unwind info. If flag_exceptions is turned on we need to
turn off the partitioning optimization. */
- /* LLVM LOCAL 6635085 */
- if (flag_exceptions > 0 && flag_reorder_blocks_and_partition)
+ if (flag_exceptions && flag_reorder_blocks_and_partition)
{
inform
("-freorder-blocks-and-partition does not work with exceptions");
Modified: llvm-gcc-4.2/trunk/gcc/tree-eh.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/tree-eh.c?rev=118768&r1=118767&r2=118768&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/tree-eh.c (original)
+++ llvm-gcc-4.2/trunk/gcc/tree-eh.c Wed Nov 10 19:59:08 2010
@@ -1355,11 +1355,6 @@
struct leh_state this_state;
int ndests;
- /* LLVM LOCAL begin 6635085 */
- /* if ( ! flag_exceptions)
- fatal_error("try/catch constructs require -fexceptions"); */
- /* LLVM LOCAL end 6635085 */
-
/* Process the try block. */
memset (&this_tf, 0, sizeof (this_tf));
Modified: llvm-gcc-4.2/trunk/gcc/tree-ssa-math-opts.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/tree-ssa-math-opts.c?rev=118768&r1=118767&r2=118768&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/tree-ssa-math-opts.c (original)
+++ llvm-gcc-4.2/trunk/gcc/tree-ssa-math-opts.c Wed Nov 10 19:59:08 2010
@@ -259,8 +259,6 @@
if (occ_child->children)
compute_merit (occ_child);
- /* LLVM LOCAL 6635085 */
- gcc_assert(flag_exceptions >= 0);
if (flag_exceptions)
bb = single_noncomplex_succ (dom);
else
More information about the llvm-commits
mailing list