@@ -60,8 +60,9 @@ static std::optional<StringRef> extractMdStringValue(MDNode *Node,
60
60
template <typename T, typename = std::enable_if_t <
61
61
std::is_enum_v<T> &&
62
62
std::is_same_v<std::underlying_type_t <T>, uint32_t >>>
63
- Expected<T> extractEnumValue (MDNode *Node, unsigned int OpId, StringRef ErrText,
64
- llvm::function_ref<bool (uint32_t )> VerifyFn) {
63
+ static Expected<T>
64
+ extractEnumValue (MDNode *Node, unsigned int OpId, StringRef ErrText,
65
+ llvm::function_ref<bool (uint32_t )> VerifyFn) {
65
66
if (std::optional<uint32_t > Val = extractMdIntValue (Node, OpId)) {
66
67
if (!VerifyFn (*Val))
67
68
return make_error<RootSignatureValidationError<uint32_t >>(ErrText, *Val);
@@ -543,8 +544,9 @@ Error MetadataParser::parseRootSignatureElement(mcdxbc::RootSignatureDesc &RSD,
543
544
llvm_unreachable (" Unhandled RootSignatureElementKind enum." );
544
545
}
545
546
546
- Error validateDescriptorTableSamplerMixin (mcdxbc::DescriptorTable Table,
547
- uint32_t Location) {
547
+ static Error
548
+ validateDescriptorTableSamplerMixin (const mcdxbc::DescriptorTable &Table,
549
+ uint32_t Location) {
548
550
dxil::ResourceClass CurrRC = dxil::ResourceClass::Sampler;
549
551
for (const mcdxbc::DescriptorRange &Range : Table.Ranges ) {
550
552
if (Range.RangeType == dxil::ResourceClass::Sampler &&
@@ -555,8 +557,9 @@ Error validateDescriptorTableSamplerMixin(mcdxbc::DescriptorTable Table,
555
557
return Error::success ();
556
558
}
557
559
558
- Error validateDescriptorTableRegisterOverflow (mcdxbc::DescriptorTable Table,
559
- uint32_t Location) {
560
+ static Error
561
+ validateDescriptorTableRegisterOverflow (const mcdxbc::DescriptorTable &Table,
562
+ uint32_t Location) {
560
563
uint64_t Offset = 0 ;
561
564
562
565
for (const mcdxbc::DescriptorRange &Range : Table.Ranges ) {
0 commit comments