Skip to content

Commit 3f5eb15

Browse files
committed
review: style fixups
1 parent 496ab5d commit 3f5eb15

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

clang/lib/CodeGen/CGHLSLRuntime.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,7 @@ void CGHLSLRuntime::emitEntryFunction(const FunctionDecl *FD,
439439
B.CreateRetVoid();
440440

441441
// Add and identify root signature to function, if applicable
442-
const AttrVec &Attrs = FD->getAttrs();
443-
for (const Attr *Attr : Attrs) {
442+
for (const Attr *Attr : FD->getAttrs()) {
444443
if (const auto *RSAttr = dyn_cast<RootSignatureAttr>(Attr))
445444
addRootSignature(RSAttr->getSignatureDecl()->getRootElements(), EntryFn,
446445
M);

llvm/lib/Frontend/HLSL/HLSLRootSignature.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,12 @@ MDNode *MetadataBuilder::BuildRootSignature() {
183183
}
184184

185185
MDNode *MetadataBuilder::BuildDescriptorTable(const DescriptorTable &Table) {
186-
IRBuilder<> B(Ctx);
186+
IRBuilder<> Builder(Ctx);
187187
SmallVector<Metadata *> TableOperands;
188188
// Set the mandatory arguments
189189
TableOperands.push_back(MDString::get(Ctx, "DescriptorTable"));
190190
TableOperands.push_back(ConstantAsMetadata::get(
191-
B.getInt32(llvm::to_underlying(Table.Visibility))));
191+
Builder.getInt32(llvm::to_underlying(Table.Visibility))));
192192

193193
// Remaining operands are references to the table's clauses. The in-memory
194194
// representation of the Root Elements created from parsing will ensure that
@@ -206,19 +206,19 @@ MDNode *MetadataBuilder::BuildDescriptorTable(const DescriptorTable &Table) {
206206

207207
MDNode *MetadataBuilder::BuildDescriptorTableClause(
208208
const DescriptorTableClause &Clause) {
209-
IRBuilder<> B(Ctx);
209+
IRBuilder<> Builder(Ctx);
210210
std::string Name;
211211
llvm::raw_string_ostream OS(Name);
212212
OS << Clause.Type;
213213
return MDNode::get(
214214
Ctx, {
215215
MDString::get(Ctx, OS.str()),
216-
ConstantAsMetadata::get(B.getInt32(Clause.NumDescriptors)),
217-
ConstantAsMetadata::get(B.getInt32(Clause.Reg.Number)),
218-
ConstantAsMetadata::get(B.getInt32(Clause.Space)),
219-
ConstantAsMetadata::get(B.getInt32(Clause.Offset)),
216+
ConstantAsMetadata::get(Builder.getInt32(Clause.NumDescriptors)),
217+
ConstantAsMetadata::get(Builder.getInt32(Clause.Reg.Number)),
218+
ConstantAsMetadata::get(Builder.getInt32(Clause.Space)),
219+
ConstantAsMetadata::get(Builder.getInt32(Clause.Offset)),
220220
ConstantAsMetadata::get(
221-
B.getInt32(llvm::to_underlying(Clause.Flags))),
221+
Builder.getInt32(llvm::to_underlying(Clause.Flags))),
222222
});
223223
}
224224

0 commit comments

Comments
 (0)