Skip to content

Commit 2a8f524

Browse files
committed
Fix build by reverting a ValueMap back to std::map
Commit 4a9c78e ("Prepare SPIRVWriter for type conversion without opaque pointers. (#1499)", 2022-06-20) changed `OCLTypeToSPIRVBase::AdaptedTy` to a `ValueMap`, but that made `OCLTypeToSPIRVBase` non-movable and non-copyable. Landing eb8e9ad ("Migrate SPIRVWriter to new PassManager", 2022-06-20) on top caused a build breakage.
1 parent eb8e9ad commit 2a8f524

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/SPIRV/OCLTypeToSPIRV.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
#include "llvm/IR/Function.h"
4747
#include "llvm/IR/LLVMContext.h"
4848
#include "llvm/IR/PassManager.h"
49-
#include "llvm/IR/ValueMap.h"
5049
#include "llvm/Pass.h"
5150

5251
#include <map>
@@ -71,7 +70,7 @@ class OCLTypeToSPIRVBase {
7170
llvm::Module *M;
7271
llvm::LLVMContext *Ctx;
7372
// Map of argument/Function -> {pointee type, address space}
74-
llvm::ValueMap<llvm::Value *, std::pair<llvm::Type *, unsigned>> AdaptedTy;
73+
std::map<llvm::Value *, std::pair<llvm::Type *, unsigned>> AdaptedTy;
7574
std::set<llvm::Function *> WorkSet; // Functions to be adapted
7675

7776
void adaptFunctionArguments(llvm::Function *F);

0 commit comments

Comments
 (0)