Skip to content

Commit

Permalink
Remove redundant interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronj0 committed Apr 4, 2024
1 parent 647551b commit c6d098b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 30 deletions.
8 changes: 1 addition & 7 deletions include/clang/Interpreter/CppInterOp.h
Original file line number Diff line number Diff line change
Expand Up @@ -341,13 +341,7 @@ namespace Cpp {
CPPINTEROP_API std::vector<TCppFunction_t>
GetTemplatedMethods(const std::string& name, TCppScope_t parent = nullptr,
const std::string& filter = "");

CPPINTEROP_API TCppIndex_t GetNumTemplatedMethods(TCppScope_t scope,
bool accept_namespace);

CPPINTEROP_API std::string GetTemplatedMethodName(TCppScope_t scope,
TCppIndex_t imeth);


/// Checks if the provided parameter is a method.
CPPINTEROP_API bool IsMethod(TCppConstFunction_t method);

Expand Down
24 changes: 1 addition & 23 deletions lib/Interpreter/CppInterOp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1009,29 +1009,7 @@ namespace Cpp {

return {};
}

TCppIndex_t GetNumTemplatedMethods(TCppScope_t scope, bool accept_namespace) {
if (!accept_namespace && IsNamespace(scope))
return (TCppIndex_t)0; // Enforce lazy

std::vector<TCppFunction_t> mc;
GetFunctionTemplatedDecls(scope, mc);
TCppIndex_t res = 0;

for (auto method : mc) {
res += IsTemplatedFunction(method) ? 1 : 0;
}
return res;
}

std::string GetTemplatedMethodName(TCppScope_t scope, TCppIndex_t imeth) {
std::vector<TCppFunction_t> mc;
GetFunctionTemplatedDecls(scope, mc);
auto* D = (FunctionTemplateDecl*)mc[imeth];

return D->getNameAsString();
}


TCppFunction_t
BestTemplateFunctionMatch(const std::vector<TCppFunction_t>& candidates,
const std::vector<TemplateArgInfo>& explicit_types,
Expand Down

0 comments on commit c6d098b

Please sign in to comment.