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 {
7979// / its `TGen` parameter. Useful to avoid conditional compilation complexity, as
8080// / a compile-time replacement for a real AOT-ed model.
8181class 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."
8485
8586public:
8687 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
9294};
9395} // namespace llvm
9496
You can’t perform that action at this time.
0 commit comments