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

Commit 9016bc4

Browse files
committed
Fixup uwtable attribute under LLVM15+
1 parent 0b6005e commit 9016bc4

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

omniscidb/QueryEngine/QueryTemplateGenerator.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,13 +357,21 @@ class QueryTemplateGenerator {
357357
PAS = llvm::AttributeList::get(mod->getContext(), 10U, B);
358358
}
359359

360-
// NOTE(adb): This attribute is missing in the query template. Why?
360+
// NOTE(adb): This attribute is missing in the query template. Why?
361+
#if LLVM_VERSION_MAJOR > 14
361362
Attrs.push_back(PAS);
363+
{
364+
ATTR_BUILDER(mod->getContext());
365+
B.addUWTableAttr(llvm::UWTableKind::Default);
366+
PAS = llvm::AttributeList::get(mod->getContext(), ~0U, B);
367+
}
368+
#else
362369
{
363370
ATTR_BUILDER(mod->getContext());
364371
B.addAttribute(llvm::Attribute::UWTable);
365372
PAS = llvm::AttributeList::get(mod->getContext(), ~0U, B);
366373
}
374+
#endif
367375

368376
Attrs.push_back(PAS);
369377

0 commit comments

Comments
 (0)