[llvm-commits] [llvm-gcc-4.2] r41765 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Anton Korobeynikov
asl at math.spbu.ru
Fri Sep 7 04:42:00 PDT 2007
Author: asl
Date: Fri Sep 7 06:42:00 2007
New Revision: 41765
URL: http://llvm.org/viewvc/llvm-project?rev=41765&view=rev
Log:
Frontend support for new EH intrinsics
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
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=41765&r1=41764&r2=41765&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Fri Sep 7 06:42:00 2007
@@ -1736,18 +1736,24 @@
// Check to see if the exception values have been constructed.
if (ExceptionValue) return;
+ const Type *IntPtr = TD.getIntPtrType();
+
ExceptionValue = CreateTemporary(PointerType::get(Type::Int8Ty));
ExceptionValue->setName("eh_exception");
- ExceptionSelectorValue = CreateTemporary(Type::Int32Ty);
+ ExceptionSelectorValue = CreateTemporary(IntPtr);
ExceptionSelectorValue->setName("eh_selector");
FuncEHException = Intrinsic::getDeclaration(TheModule,
Intrinsic::eh_exception);
FuncEHSelector = Intrinsic::getDeclaration(TheModule,
- Intrinsic::eh_selector);
+ (IntPtr == Type::Int32Ty ?
+ Intrinsic::eh_selector_i32 :
+ Intrinsic::eh_selector_i64));
FuncEHGetTypeID = Intrinsic::getDeclaration(TheModule,
- Intrinsic::eh_typeid_for);
+ (IntPtr == Type::Int32Ty ?
+ Intrinsic::eh_typeid_for_i32 :
+ Intrinsic::eh_typeid_for_i64));
assert(llvm_eh_personality_libfunc
&& "no exception handling personality function!");
More information about the llvm-commits
mailing list