[llvm-branch-commits] [llvm-gcc-branch] r68995 - /llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-convert.cpp
Bill Wendling
isanbard at gmail.com
Mon Apr 13 14:48:41 PDT 2009
Author: void
Date: Mon Apr 13 16:48:41 2009
New Revision: 68995
URL: http://llvm.org/viewvc/llvm-project?rev=68995&view=rev
Log:
--- Merging (from foreign repository) r68993 into '.':
U gcc/llvm-convert.cpp
If the second argument of __builtin_longjmp isn't '1', then issue an error. GCC
issues this error, but during the RTX phase.
Modified:
llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-convert.cpp
Modified: llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-convert.cpp?rev=68995&r1=68994&r2=68995&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-convert.cpp Mon Apr 13 16:48:41 2009
@@ -5011,19 +5011,31 @@
#if 1 // FIXME: Should handle these GCC extensions eventually.
- case BUILT_IN_APPLY_ARGS:
- case BUILT_IN_APPLY:
- case BUILT_IN_RETURN:
- case BUILT_IN_SAVEREGS:
- case BUILT_IN_ARGS_INFO:
- case BUILT_IN_NEXT_ARG:
- case BUILT_IN_CLASSIFY_TYPE:
- case BUILT_IN_AGGREGATE_INCOMING_ADDRESS:
- case BUILT_IN_SETJMP_SETUP:
- case BUILT_IN_SETJMP_DISPATCHER:
- case BUILT_IN_SETJMP_RECEIVER:
- case BUILT_IN_LONGJMP:
- case BUILT_IN_UPDATE_SETJMP_BUF:
+ case BUILT_IN_LONGJMP: {
+ tree arglist = TREE_OPERAND(exp, 1);
+
+ if (validate_arglist(arglist, POINTER_TYPE, INTEGER_TYPE, VOID_TYPE)) {
+ tree value = TREE_VALUE(TREE_CHAIN(arglist));
+
+ if (TREE_CODE(value) != INTEGER_CST ||
+ cast<ConstantInt>(Emit(value, 0))->getValue() != 1) {
+ error ("%<__builtin_longjmp%> second argument must be 1");
+ return false;
+ }
+ }
+ }
+ case BUILT_IN_APPLY_ARGS:
+ case BUILT_IN_APPLY:
+ case BUILT_IN_RETURN:
+ case BUILT_IN_SAVEREGS:
+ case BUILT_IN_ARGS_INFO:
+ case BUILT_IN_NEXT_ARG:
+ case BUILT_IN_CLASSIFY_TYPE:
+ case BUILT_IN_AGGREGATE_INCOMING_ADDRESS:
+ case BUILT_IN_SETJMP_SETUP:
+ case BUILT_IN_SETJMP_DISPATCHER:
+ case BUILT_IN_SETJMP_RECEIVER:
+ case BUILT_IN_UPDATE_SETJMP_BUF:
// FIXME: HACK: Just ignore these.
{
More information about the llvm-branch-commits
mailing list