Commit 52561540 authored by Brenden Blanco's avatar Brenden Blanco Committed by 4ast

Fix for C++ api change in LLVM 3.9 (#600)

Upstream, params() was renamed to parameters(). In order to support both
old and new LLVM, use the unchanged param_begin and param_end API.
Signed-off-by: default avatarBrenden Blanco <bblanco@plumgrid.com>
parent e422f5e5
......@@ -265,7 +265,8 @@ bool BTypeVisitor::VisitFunctionDecl(FunctionDecl *D) {
// remember the arg names of the current function...first one is the ctx
fn_args_.clear();
string preamble = "{";
for (auto arg : D->params()) {
for (auto arg_it = D->param_begin(); arg_it != D->param_end(); arg_it++) {
auto arg = *arg_it;
if (arg->getName() == "") {
error(arg->getLocEnd(), "arguments to BPF program definition must be named");
return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment