Skip to content

Commit

Permalink
Merge pull request iovisor#1725 from iovisor/yhs_dev
Browse files Browse the repository at this point in the history
fix compilation error with latest llvm
  • Loading branch information
yonghong-song committed May 2, 2018
2 parents 01c843e + 806627e commit aa1201a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/cc/frontends/clang/b_frontend_action.cc
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,11 @@ bool ProbeVisitor::IsContextMemberExpr(Expr *E) {

SourceRange
ProbeVisitor::expansionRange(SourceRange range) {
#if LLVM_MAJOR_VERSION >= 7
return rewriter_.getSourceMgr().getExpansionRange(range).getAsRange();
#else
return rewriter_.getSourceMgr().getExpansionRange(range);
#endif
}

template <unsigned N>
Expand Down Expand Up @@ -695,7 +699,11 @@ bool BTypeVisitor::VisitImplicitCastExpr(ImplicitCastExpr *E) {

SourceRange
BTypeVisitor::expansionRange(SourceRange range) {
#if LLVM_MAJOR_VERSION >= 7
return rewriter_.getSourceMgr().getExpansionRange(range).getAsRange();
#else
return rewriter_.getSourceMgr().getExpansionRange(range);
#endif
}

template <unsigned N>
Expand Down

0 comments on commit aa1201a

Please sign in to comment.