Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support opaque pointers #172

Merged
merged 8 commits into from
Jul 20, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Template magic to fix GCC build
  • Loading branch information
dpaoliello committed Jul 19, 2023
commit 33e893c9dd0c16337e380f5ce80bdb010b4b62f4
6 changes: 3 additions & 3 deletions lib/Target/CBackend/CBackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ static cl::opt<bool> DeclareLocalsLate(
"Note that "
"this is not legal in standard C prior to C99."));

template <typename TReturn, typename... TArgs>
TReturn
template <typename TReturn, typename TCallInst, typename... TArgs>
std::enable_if_t<std::is_base_of_v<TCallInst, CallInst>, TReturn>
VisitFunctionInfoVariant(TReturn (Function::*FunctionOverload)(TArgs...) const,
TReturn (CallInst::*CallInstOverload)(TArgs...) const,
TReturn (TCallInst::*CallInstOverload)(TArgs...) const,
FunctionInfoVariant FIV, TArgs... Args) {
if (auto F = std::get_if<const Function *>(&FIV)) {
return (*F->*FunctionOverload)(Args...);
Expand Down