From 20670ba52cdcb74ebf8aa630f686b6c5278869b9 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Thu, 16 Mar 2017 23:13:49 +0000 Subject: [PATCH] Update for LLVM API removal of Function::getArgumentList() llvm-svn: 298011 --- .../Plugins/ExpressionParser/Clang/IRForTarget.cpp | 10 +++++----- .../RenderScriptRuntime/RenderScriptx86ABIFixups.cpp | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp b/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp index 42a11676a265..68a214ee4683 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp @@ -1853,9 +1853,9 @@ bool IRForTarget::ReplaceVariables(Function &llvm_function) { if (!m_decl_map->GetStructInfo(num_elements, size, alignment)) return false; - Function::arg_iterator iter(llvm_function.getArgumentList().begin()); + Function::arg_iterator iter(llvm_function.arg_begin()); - if (iter == llvm_function.getArgumentList().end()) { + if (iter == llvm_function.arg_end()) { m_error_stream.Printf("Internal error [IRForTarget]: Wrapper takes no " "arguments (should take at least a struct pointer)"); @@ -1867,7 +1867,7 @@ bool IRForTarget::ReplaceVariables(Function &llvm_function) { if (argument->getName().equals("this")) { ++iter; - if (iter == llvm_function.getArgumentList().end()) { + if (iter == llvm_function.arg_end()) { m_error_stream.Printf("Internal error [IRForTarget]: Wrapper takes only " "'this' argument (should take a struct pointer " "too)"); @@ -1879,7 +1879,7 @@ bool IRForTarget::ReplaceVariables(Function &llvm_function) { } else if (argument->getName().equals("self")) { ++iter; - if (iter == llvm_function.getArgumentList().end()) { + if (iter == llvm_function.arg_end()) { m_error_stream.Printf("Internal error [IRForTarget]: Wrapper takes only " "'self' argument (should take '_cmd' and a struct " "pointer too)"); @@ -1897,7 +1897,7 @@ bool IRForTarget::ReplaceVariables(Function &llvm_function) { ++iter; - if (iter == llvm_function.getArgumentList().end()) { + if (iter == llvm_function.arg_end()) { m_error_stream.Printf("Internal error [IRForTarget]: Wrapper takes only " "'self' and '_cmd' arguments (should take a struct " "pointer too)"); diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp index 9aabe76241d6..8a2bb3cbf3f7 100644 --- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp +++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp @@ -267,8 +267,7 @@ bool fixupRSAllocationStructByValCalls(llvm::Module &module) { // for all called function decls for (auto func : rs_functions) { // inspect all of the arguments in the call - llvm::SymbolTableList &arg_list = func->getArgumentList(); - for (auto &arg : arg_list) { + for (auto &arg : func->args()) { if (arg.hasByValAttr()) { arg.removeAttr(attr_byval); changed = true;