From 89947017ddc118def00f2eadf34d6d46930cf270 Mon Sep 17 00:00:00 2001 From: Zhengyang Liu Date: Thu, 27 Sep 2018 21:23:47 -0600 Subject: [PATCH] Crashes with report when call getValue() on operands returns null --- lib/Pass/Pass.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/Pass/Pass.cpp b/lib/Pass/Pass.cpp index 1792d99fb..3b793dd77 100644 --- a/lib/Pass/Pass.cpp +++ b/lib/Pass/Pass.cpp @@ -419,9 +419,7 @@ struct SouperPass : public ModulePass { Value *NewVal = getValue(Cand.Mapping.RHS, I, EBC, DT, ReplacedValues, Builder, F->getParent()); if (!NewVal) { - if (DebugSouperPass) - errs() << "\"\n; replacement failed\n"; - continue; + report_fatal_error("Unable to find corresponding LLVM IR"); } ReplacedValues[Cand.Mapping.LHS] = NewVal;