[llvm-commits] [llvm-gcc-4.2] r84108 - in /llvm-gcc-4.2/trunk/gcc: llvm-convert.cpp tree-eh.c
Duncan Sands
baldrick at free.fr
Wed Oct 14 09:15:54 PDT 2009
Author: baldrick
Date: Wed Oct 14 11:15:54 2009
New Revision: 84108
URL: http://llvm.org/viewvc/llvm-project?rev=84108&view=rev
Log:
There is now only one version of eh.selector and eh.typeid.for.
Fix and simplify the llvm-gcc build.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
llvm-gcc-4.2/trunk/gcc/tree-eh.c
Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=84108&r1=84107&r2=84108&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Wed Oct 14 11:15:54 2009
@@ -1916,24 +1916,18 @@
// Check to see if the exception values have been constructed.
if (ExceptionValue) return;
- const Type *IntPtr = TD.getIntPtrType(Context);
-
ExceptionValue = CreateTemporary(Type::getInt8PtrTy(Context));
ExceptionValue->setName("eh_exception");
- ExceptionSelectorValue = CreateTemporary(IntPtr);
+ ExceptionSelectorValue = CreateTemporary(Type::getInt32Ty(Context));
ExceptionSelectorValue->setName("eh_selector");
FuncEHException = Intrinsic::getDeclaration(TheModule,
Intrinsic::eh_exception);
FuncEHSelector = Intrinsic::getDeclaration(TheModule,
- (IntPtr == Type::getInt32Ty(Context) ?
- Intrinsic::eh_selector_i32 :
- Intrinsic::eh_selector_i64));
+ Intrinsic::eh_selector);
FuncEHGetTypeID = Intrinsic::getDeclaration(TheModule,
- (IntPtr == Type::getInt32Ty(Context) ?
- Intrinsic::eh_typeid_for_i32 :
- Intrinsic::eh_typeid_for_i64));
+ Intrinsic::eh_typeid_for);
}
/// getPostPad - Return the post landing pad for the given exception handling
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=84108&r1=84107&r2=84108&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/tree-eh.c (original)
+++ llvm-gcc-4.2/trunk/gcc/tree-eh.c Wed Oct 14 11:15:54 2009
@@ -838,25 +838,12 @@
tree save_eptr, save_filt;
save_eptr = create_tmp_var (ptr_type_node, "save_eptr");
- /* LLVM LOCAL begin */
-#if ENABLE_LLVM
- /* LLVM exceptions use 64 bits for these on 64-bit targets. */
- save_filt = create_tmp_var (long_integer_type_node, "save_filt");
-#else
save_filt = create_tmp_var (integer_type_node, "save_filt");
-#endif
- /* LLVM LOCAL end */
i = tsi_start (finally);
x = build0 (EXC_PTR_EXPR, ptr_type_node);
x = build2 (MODIFY_EXPR, void_type_node, save_eptr, x);
tsi_link_before (&i, x, TSI_CONTINUE_LINKING);
- /* LLVM LOCAL begin */
-#if ENABLE_LLVM
- x = build0 (FILTER_EXPR, long_integer_type_node);
-#else
x = build0 (FILTER_EXPR, integer_type_node);
-#endif
- /* LLVM LOCAL end */
x = build2 (MODIFY_EXPR, void_type_node, save_filt, x);
tsi_link_before (&i, x, TSI_CONTINUE_LINKING);
@@ -865,13 +852,7 @@
x = build2 (MODIFY_EXPR, void_type_node, x, save_eptr);
tsi_link_after (&i, x, TSI_CONTINUE_LINKING);
- /* LLVM LOCAL begin */
-#if ENABLE_LLVM
- x = build0 (FILTER_EXPR, long_integer_type_node);
-#else
x = build0 (FILTER_EXPR, integer_type_node);
-#endif
- /* LLVM LOCAL end */
x = build2 (MODIFY_EXPR, void_type_node, x, save_filt);
tsi_link_after (&i, x, TSI_CONTINUE_LINKING);
More information about the llvm-commits
mailing list