Index: unittest/IceParseInstsTest.cpp |
diff --git a/unittest/IceParseInstsTest.cpp b/unittest/IceParseInstsTest.cpp |
index 5d45888dd22471ce8f19628e6152921714d62328..191eff9203a4ad6583d173e781ec507dfa92d8ac 100644 |
--- a/unittest/IceParseInstsTest.cpp |
+++ b/unittest/IceParseInstsTest.cpp |
@@ -63,6 +63,12 @@ TEST(IceParseInstsTest, NonexistentCallArg) { |
EXPECT_FALSE(Munger.runTest("Nonexistent call arg")); |
EXPECT_EQ("Error(66:4): Invalid function record: <34 0 4 2 100>\n", |
Munger.getTestResults()); |
+ |
+ // Show that we generate a fatal error when not allowing error recovery. |
+ Munger.Flags.setAllowErrorRecovery(false); |
+ EXPECT_DEATH( |
+ Munger.runTest("Nonexistent call arg"), |
+ ".*ERROR: Unable to continue.*"); |
} |
/// Test how we recognize alignments in alloca instructions. |