Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Commit fabe823

Browse files
gshimanskykurapov-peter
authored andcommitted
Disable inline of CodegenTraits::get to prevent cross-DLL access to descCallingConvToLLVM
Signed-off-by: Gregory Shimansky <[email protected]>
1 parent ad4876d commit fabe823

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

omniscidb/QueryEngine/Compiler/Backend.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,16 @@ const std::unordered_map<llvm::CallingConv::ID, CallingConvDesc>
5757
{llvm::CallingConv::SPIR_FUNC, CallingConvDesc::SPIR_FUNC},
5858
};
5959

60+
CodegenTraits CodegenTraits::get(CodegenTraitsDescriptor codegen_traits_desc) {
61+
CHECK(descCallingConvToLLVM.find(codegen_traits_desc.conv_) !=
62+
descCallingConvToLLVM.end());
63+
return CodegenTraits(codegen_traits_desc.local_addr_space_,
64+
codegen_traits_desc.smem_addr_space_,
65+
codegen_traits_desc.global_addr_space_,
66+
descCallingConvToLLVM.at(codegen_traits_desc.conv_),
67+
codegen_traits_desc.triple_);
68+
}
69+
6070
CodegenTraitsDescriptor CodegenTraits::getDescriptor(unsigned local_addr_space,
6171
unsigned shared_addr_space,
6272
unsigned global_addr_space,

omniscidb/QueryEngine/Compiler/Backend.h

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,7 @@ class CodegenTraits {
6262
local_addr_space, smem_addr_space, global_addr_space, calling_conv, triple);
6363
}
6464

65-
static CodegenTraits get(CodegenTraitsDescriptor codegen_traits_desc) {
66-
CHECK(descCallingConvToLLVM.find(codegen_traits_desc.conv_) !=
67-
descCallingConvToLLVM.end());
68-
return CodegenTraits(codegen_traits_desc.local_addr_space_,
69-
codegen_traits_desc.smem_addr_space_,
70-
codegen_traits_desc.global_addr_space_,
71-
descCallingConvToLLVM.at(codegen_traits_desc.conv_),
72-
codegen_traits_desc.triple_);
73-
}
74-
65+
static CodegenTraits get(CodegenTraitsDescriptor codegen_traits_desc);
7566
static CodegenTraitsDescriptor getDescriptor(unsigned local_addr_space,
7667
unsigned shared_addr_space,
7768
unsigned global_addr_space,

0 commit comments

Comments
 (0)