File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 5050#include " llvm/ADT/PostOrderIterator.h"
5151#include " llvm/Analysis/LoopInfo.h"
5252#include " llvm/IR/BasicBlock.h"
53+ #include " llvm/IR/DiagnosticInfo.h"
5354#include " llvm/IR/Dominators.h"
5455#include " llvm/IR/Function.h"
5556#include " llvm/IR/IRBuilder.h"
@@ -104,12 +105,14 @@ class YkControlPoint : public ModulePass {
104105
105106 bool runOnModule (Module &M) override {
106107 LLVMContext &Context = M.getContext ();
107-
108108 // Locate the "dummy" control point provided by the user.
109109 CallInst *OldCtrlPointCall = findControlPointCall (M);
110110 if (OldCtrlPointCall == nullptr ) {
111- Context.emitError (
112- " ykllvm couldn't find the call to `yk_mt_control_point()`" );
111+ // This program doesn't have a control point. We can't do any
112+ // transformations on it, but we do still want to compile it.
113+ Context.diagnose (DiagnosticInfoInlineAsm (
114+ " ykllvm couldn't find the call to `yk_mt_control_point()`" ,
115+ DS_Warning));
113116 return false ;
114117 }
115118
You can’t perform that action at this time.
0 commit comments