Skip to content

Commit

Permalink
ODB-554: Workaround for weird compiler bug in clang 14.0.3 on MacOS 13
Browse files Browse the repository at this point in the history
  • Loading branch information
simondsmart committed Mar 12, 2024
1 parent 086d0ca commit 4daf461
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/odc/api/odc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,9 @@ int odc_open_stream(odc_reader_t** reader, void* handle, odc_stream_read_t strea
ReadStreamDataHandle(void* handle, odc_stream_read_t fn) : handle_(handle), fn_(fn) {}
virtual ~ReadStreamDataHandle() {}
void print(std::ostream& s) const override { s << "StreamReadHandle(" << fn_ << "(" << handle_ << "))"; }
Length openForRead() override { return 0; }
// Hack for compiler bug on clang-14.0.3 running on MacOS 13
static Length workaroundFunction() { return 0; }
Length openForRead() override { return workaroundFunction(); }
void openForWrite(const Length&) override { NOTIMP; }
void openForAppend(const Length&) override { NOTIMP; }
long read(void* buffer, long length) override { return fn_(handle_, buffer, length); }
Expand Down

0 comments on commit 4daf461

Please sign in to comment.