File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
llvm/include/llvm/Analysis Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -79,16 +79,18 @@ class ReleaseModeModelRunner final : public MLModelRunner {
79
79
// / its `TGen` parameter. Useful to avoid conditional compilation complexity, as
80
80
// / a compile-time replacement for a real AOT-ed model.
81
81
class NoopSavedModelImpl final {
82
- const char *ErrMsg = " The mock AOT-ed saved model is a compile-time stub and "
83
- " should not be called." ;
82
+ #define NOOP_MODEL_ERRMSG \
83
+ " The mock AOT-ed saved model is a compile-time stub and should not be " \
84
+ " called."
84
85
85
86
public:
86
87
NoopSavedModelImpl () = default ;
87
- int LookupArgIndex (const std::string &) { llvm_unreachable (ErrMsg); }
88
- int LookupResultIndex (const std::string &) { llvm_unreachable (ErrMsg); }
89
- void Run () { llvm_unreachable (ErrMsg); }
90
- void *result_data (int ) { llvm_unreachable (ErrMsg); }
91
- void *arg_data (int ) { llvm_unreachable (ErrMsg); }
88
+ int LookupArgIndex (const std::string &) { llvm_unreachable (NOOP_MODEL_ERRMSG); }
89
+ int LookupResultIndex (const std::string &) { llvm_unreachable (NOOP_MODEL_ERRMSG); }
90
+ void Run () { llvm_unreachable (NOOP_MODEL_ERRMSG); }
91
+ void *result_data (int ) { llvm_unreachable (NOOP_MODEL_ERRMSG); }
92
+ void *arg_data (int ) { llvm_unreachable (NOOP_MODEL_ERRMSG); }
93
+ #undef NOOP_MODEL_ERRMSG
92
94
};
93
95
} // namespace llvm
94
96
You can’t perform that action at this time.
0 commit comments