1; RUN: not llvm-extract -S -bb foo:invalidbb %s 2>&1 | FileCheck %s 2 3; CHECK: function foo doesn't contain a basic block named 'invalidbb'! 4define i32 @foo(i32 %arg) { 5bb: 6 %tmp = alloca i32, align 4 7 %tmp1 = alloca i32, align 4 8 store i32 %arg, i32* %tmp1, align 4 9 %tmp2 = load i32, i32* %tmp1, align 4 10 %tmp3 = icmp sgt i32 %tmp2, 0 11 br i1 %tmp3, label %bb4, label %bb7 12 13bb4: ; preds = %bb 14 %tmp5 = load i32, i32* %tmp1, align 4 15 %tmp6 = add nsw i32 %tmp5, 1 16 store i32 %tmp6, i32* %tmp1, align 4 17 store i32 %tmp6, i32* %tmp, align 4 18 br label %bb8 19 20bb7: ; preds = %bb 21 store i32 0, i32* %tmp, align 4 22 br label %bb8 23 24bb8: ; preds = %bb7, %bb4 25 %tmp9 = load i32, i32* %tmp, align 4 26 ret i32 %tmp9 27} 28 29