Skip to content

Commit

Permalink
Fix SPIRVToOCL pass ID argument to be a reference
Browse files Browse the repository at this point in the history
The ModulePass constructor takes a reference so we should forward the
reference given to the SPIRVToOCL constructor.

Reported-by: Stuart Brady
  • Loading branch information
svenvh committed Sep 27, 2019
1 parent 4f459a8 commit 99e0a01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/SPIRV/SPIRVToOCL.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
namespace SPIRV {
class SPIRVToOCL : public ModulePass, public InstVisitor<SPIRVToOCL> {
protected:
SPIRVToOCL(char ID) : ModulePass(ID), M(nullptr), Ctx(nullptr) {}
SPIRVToOCL(char &ID) : ModulePass(ID), M(nullptr), Ctx(nullptr) {}

public:
virtual bool runOnModule(Module &M) = 0;
Expand Down

0 comments on commit 99e0a01

Please sign in to comment.