From 9d83de42f02b95f8ffa919e797676200fbb45f0f Mon Sep 17 00:00:00 2001 From: Luke Drummond Date: Wed, 3 Aug 2016 16:29:45 +0000 Subject: Fix an unused variable warning in release builds. ``num_params`` was unused in RenderScript ABI fixup pass ``cloneToStructRetFnTy`` and was only used in an `assert()` that the number of function parameters for the cloned function was correct. Now we actually use this variable, rather than recomputing it, and avoid the unused variable warning when building without asserts enabled. Subscribers: lldb-commits llvm-svn: 277608 --- .../RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp') diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp index 30768750b49..98022630877 100644 --- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp +++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp @@ -103,8 +103,8 @@ cloneToStructRetFnTy(llvm::CallInst *call_inst) if (log) log->Printf("%s - cloning to StructRet function for '%s'", __FUNCTION__, name.str().c_str()); - std::vector new_params{orig_type->getNumParams() + 1, nullptr}; unsigned num_params = orig_type->getNumParams(); + std::vector new_params{num_params + 1, nullptr}; std::vector params{orig_type->param_begin(), orig_type->param_end()}; // This may not work if the function is somehow declared void as llvm is strongly typed -- cgit v1.2.3