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 50
50
#include " llvm/ADT/PostOrderIterator.h"
51
51
#include " llvm/Analysis/LoopInfo.h"
52
52
#include " llvm/IR/BasicBlock.h"
53
+ #include " llvm/IR/DiagnosticInfo.h"
53
54
#include " llvm/IR/Dominators.h"
54
55
#include " llvm/IR/Function.h"
55
56
#include " llvm/IR/IRBuilder.h"
@@ -104,12 +105,14 @@ class YkControlPoint : public ModulePass {
104
105
105
106
bool runOnModule (Module &M) override {
106
107
LLVMContext &Context = M.getContext ();
107
-
108
108
// Locate the "dummy" control point provided by the user.
109
109
CallInst *OldCtrlPointCall = findControlPointCall (M);
110
110
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));
113
116
return false ;
114
117
}
115
118
You can’t perform that action at this time.
0 commit comments