Skip to content

Commit 26ef905

Browse files
committed
address pr comments
1 parent 33de09b commit 26ef905

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

clang/lib/CodeGen/CGBuiltin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18187,7 +18187,7 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID,
1818718187
Value *Op0 = EmitScalarExpr(E->getArg(0));
1818818188
return Builder.CreateIntrinsic(
1818918189
/*ReturnType=*/llvm::Type::getInt1Ty(getLLVMContext()),
18190-
CGHLSLUtils::get_hlsl_all_intrinsic(
18190+
HLSLUtils::get_hlsl_all_intrinsic(
1819118191
CGM.getTarget().getTriple().getArch()),
1819218192
ArrayRef<Value *>{Op0}, nullptr, "hlsl.all");
1819318193
}

clang/lib/CodeGen/CGHLSLRuntime.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ llvm::Value *CGHLSLRuntime::emitInputSemantic(IRBuilder<> &B,
343343
}
344344
if (D.hasAttr<HLSLSV_DispatchThreadIDAttr>()) {
345345
llvm::Function *ThreadIDIntrinsic =
346-
CGM.getIntrinsic(CGHLSLUtils::get_hlsl_thread_id_intrinsic(
346+
CGM.getIntrinsic(HLSLUtils::get_hlsl_thread_id_intrinsic(
347347
CGM.getTarget().getTriple().getArch()));
348348
return buildVectorInput(B, ThreadIDIntrinsic, Ty);
349349
}

clang/lib/CodeGen/CGHLSLUtils.h

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//
88
//===----------------------------------------------------------------------===//
99
//
10-
// This File Provides utility function for HLSL code generation.
10+
// This file provides utility functions for HLSL code generation.
1111
// It is used to abstract away implementation details of backends.
1212
//
1313
//===----------------------------------------------------------------------===//
@@ -33,12 +33,14 @@
3333
} \
3434
}
3535

36-
class CGHLSLUtils {
37-
public:
38-
GENERATE_HLSL_INTRINSIC_FUNCTION(all)
39-
GENERATE_HLSL_INTRINSIC_FUNCTION(thread_id)
40-
private:
41-
CGHLSLUtils() = delete;
42-
};
36+
namespace clang::CodeGen {
37+
class HLSLUtils {
38+
public:
39+
GENERATE_HLSL_INTRINSIC_FUNCTION(all)
40+
GENERATE_HLSL_INTRINSIC_FUNCTION(thread_id)
41+
private:
42+
HLSLUtils() = delete;
43+
};
44+
} // namespace clang::CodeGen
4345

44-
#endif
46+
#endif // LLVM_CLANG_LIB_CODEGEN_CGHLSLUTILS_H

0 commit comments

Comments
 (0)