Skip to content

Commit

Permalink
slang-tidy trying to fix win64 linking issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Sustrak committed Jun 25, 2023
1 parent 23258d2 commit 176c972
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/tidy/include/TidyFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

class TidyCheck;

class Registry {
class SLANG_EXPORT Registry {
public:
using RegistryFunction = std::function<std::unique_ptr<TidyCheck>()>;
struct RegistryValue {
Expand Down Expand Up @@ -69,11 +69,11 @@ class Registry {
static const TidyConfig& getConfig() { return config(); }

static void setSourceManager(const slang::SourceManager* sm) { *sourceManager() = sm; }
static const slang::SourceManager* getSourceManager() {
static slang::not_null<const slang::SourceManager*> getSourceManager() {
if (auto sm = *sourceManager(); sm == nullptr)
SLANG_THROW(std::runtime_error("TidyFactory: Trying to get SourceManager, but factory "
"pointer has not been initialized"));
return *sourceManager();
return slang::not_null<const slang::SourceManager*>(*sourceManager());
}

private:
Expand Down

0 comments on commit 176c972

Please sign in to comment.