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!"); _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits