Skip to content

Commit 75e6b0f

Browse files
committed
Remove unused function
1 parent 0d1bc12 commit 75e6b0f

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

clang/lib/CodeGen/CGHLSLRuntime.cpp

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -112,37 +112,6 @@ static int getTotalArraySize(ASTContext &AST, const clang::Type *Ty) {
112112
return AST.getConstantArrayElementCount(cast<ConstantArrayType>(Ty));
113113
}
114114

115-
// Find constructor decl for a specific resource record type and binding
116-
// (implicit vs. explicit). The constructor has 5 parameters.
117-
// For explicit binding the signature is:
118-
// void(unsigned, unsigned, int, unsigned, const char *).
119-
// For implicit binding the signature is:
120-
// void(unsigned, int, unsigned, unsigned, const char *).
121-
static CXXConstructorDecl *findResourceConstructorDecl(ASTContext &AST,
122-
QualType ResTy,
123-
bool ExplicitBinding) {
124-
std::array<QualType, 5> ExpParmTypes = {
125-
AST.UnsignedIntTy, AST.UnsignedIntTy, AST.UnsignedIntTy,
126-
AST.UnsignedIntTy, AST.getPointerType(AST.CharTy.withConst())};
127-
ExpParmTypes[ExplicitBinding ? 2 : 1] = AST.IntTy;
128-
129-
CXXRecordDecl *ResDecl = ResTy->getAsCXXRecordDecl();
130-
for (auto *Ctor : ResDecl->ctors()) {
131-
if (Ctor->getNumParams() != ExpParmTypes.size())
132-
continue;
133-
auto *ParmIt = Ctor->param_begin();
134-
auto ExpTyIt = ExpParmTypes.begin();
135-
for (; ParmIt != Ctor->param_end() && ExpTyIt != ExpParmTypes.end();
136-
++ParmIt, ++ExpTyIt) {
137-
if ((*ParmIt)->getType() != *ExpTyIt)
138-
break;
139-
}
140-
if (ParmIt == Ctor->param_end())
141-
return Ctor;
142-
}
143-
llvm_unreachable("did not find constructor for resource class");
144-
}
145-
146115
static Value *buildNameForResource(llvm::StringRef BaseName,
147116
CodeGenModule &CGM) {
148117
llvm::SmallString<64> GlobalName = {BaseName, ".str"};

0 commit comments

Comments
 (0)