From f84641f4290671a09fef2977bb457eaf811f59a3 Mon Sep 17 00:00:00 2001 From: hmatar Date: Fri, 27 Apr 2018 09:16:12 +0300 Subject: [PATCH] Use arg_iterator instead of getArgumentList() This is backward compatible and favors new LLVM/Clang releases --- lib/Transforms/Instrumentation/InstrumentParallel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Transforms/Instrumentation/InstrumentParallel.cpp b/lib/Transforms/Instrumentation/InstrumentParallel.cpp index fbfb6c4..d8bec7e 100644 --- a/lib/Transforms/Instrumentation/InstrumentParallel.cpp +++ b/lib/Transforms/Instrumentation/InstrumentParallel.cpp @@ -266,8 +266,8 @@ bool InstrumentParallel::runOnFunction(Function &F) { ValueToValueMapTy VMap; Function *new_function = CloneFunction(&F, VMap); new_function->setName(functionName + "__swordomp__"); - Function::ArgumentListType::iterator it = F.getArgumentList().begin(); - Function::ArgumentListType::iterator end = F.getArgumentList().end(); + Function::arg_iterator it = F.arg_begin(); + Function::arg_iterator end = F.arg_end(); std::vector args; while (it != end) { Argument *Args = &(*it);