code) when calling noreturn functions; general expression emission
isn't ready to do the right thing in all cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65473
91177308-0d34-0410-b5e6-
96231b3b80d8
Builder.CreateUnreachable();
Builder.ClearInsertionPoint();
+ // FIXME: For now, emit a dummy basic block because expr
+ // emitters in generally are not ready to handle emitting
+ // expressions at unreachable points.
+ EnsureInsertPoint();
+
// Return a reasonable RValue.
return GetUndefRValue(RetTy);
}
// RUN: grep 'call i32 @f10_t() readnone' %t &&
int __attribute__((const)) f10_t(void);
int f10(void) { return f10_t(); }
+int f11(void) {
+ exit:
+ return f10_t();
+}
+int f12(int arg) {
+ return arg ? 0 : f10_t();
+}
// RUN: true