Skip to content

Commit 2640b02

Browse files
committed
review: use else-if
1 parent 079c6a6 commit 2640b02

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/lib/Frontend/HLSL/HLSLRootSignature.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,13 @@ MDNode *MetadataBuilder::BuildRootSignature() {
173173
MDNode *ElementMD = nullptr;
174174
if (const auto &Flags = std::get_if<RootFlags>(&Element))
175175
ElementMD = BuildRootFlags(*Flags);
176-
if (const auto &Constants = std::get_if<RootConstants>(&Element))
176+
else if (const auto &Constants = std::get_if<RootConstants>(&Element))
177177
ElementMD = BuildRootConstants(*Constants);
178-
if (const auto &Descriptor = std::get_if<RootDescriptor>(&Element))
178+
else if (const auto &Descriptor = std::get_if<RootDescriptor>(&Element))
179179
ElementMD = BuildRootDescriptor(*Descriptor);
180-
if (const auto &Clause = std::get_if<DescriptorTableClause>(&Element))
180+
else if (const auto &Clause = std::get_if<DescriptorTableClause>(&Element))
181181
ElementMD = BuildDescriptorTableClause(*Clause);
182-
if (const auto &Table = std::get_if<DescriptorTable>(&Element))
182+
else if (const auto &Table = std::get_if<DescriptorTable>(&Element))
183183
ElementMD = BuildDescriptorTable(*Table);
184184

185185
// FIXME(#126586): remove once all RootElemnt variants are handled in a

0 commit comments

Comments
 (0)