Skip to content

Commit 5767fce

Browse files
committed
[compiler] Remove need for passing Module to NameMangler
This was only used for its LLVMContext, which we already provide to the mangler upon construction - perhaps for legacy reasons.
1 parent 14f70c5 commit 5767fce

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

llvm/lib/SYCLNativeCPUUtils/compiler_passes/compiler_pipeline/include/multi_llvm/multi_llvm.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ inline llvm::InlineResult InlineFunction(llvm::CallInst *CI,
6363
#endif
6464
}
6565

66-
inline llvm::StructType *getStructTypeByName(llvm::Module &module,
66+
inline llvm::StructType *getStructTypeByName(llvm::LLVMContext &ctx,
6767
llvm::StringRef name) {
68-
return llvm::StructType::getTypeByName(module.getContext(), name);
68+
return llvm::StructType::getTypeByName(ctx, name);
6969
}
7070

7171
inline llvm::DILocation *getDILocation(unsigned Line, unsigned Column,

llvm/lib/SYCLNativeCPUUtils/compiler_passes/vecz/source/vectorization_context.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ VectorizationResult &VectorizationContext::getOrCreateBuiltin(
143143
return result;
144144
}
145145

146-
compiler::utils::NameMangler Mangler(&F.getContext(), &Module);
146+
compiler::utils::NameMangler Mangler(&F.getContext());
147147
auto const BuiltinName = Mangler.demangleName(F.getName()).str();
148148

149149
result.func = VectorCallee;

0 commit comments

Comments
 (0)