Skip to content

Commit

Permalink
Silence an unused result warning when building with Clang (#28315)
Browse files Browse the repository at this point in the history
LLVM's `removeModule` is documented to return a `bool` but its value isn't used
in our `removeModule` function which returns `void`, so Clang emits a warning. This just
does a cast to `void` on the call to LLVM's function.
  • Loading branch information
ararslan authored and KristofferC committed Feb 11, 2019
1 parent 309f6e3 commit 3851462
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/jitlayers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -631,9 +631,9 @@ void JuliaOJIT::addModule(std::unique_ptr<Module> M)
void JuliaOJIT::removeModule(ModuleHandleT H)
{
#if JL_LLVM_VERSION >= 50000
CompileLayer.removeModule(H);
(void)CompileLayer.removeModule(H);
#else
CompileLayer.removeModuleSet(H);
(void)CompileLayer.removeModuleSet(H);
#endif
}

Expand Down

0 comments on commit 3851462

Please sign in to comment.