summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp
diff options
context:
space:
mode:
authorLuke Drummond <luke.drummond@codeplay.com>2016-08-03 16:29:45 +0000
committerLuke Drummond <luke.drummond@codeplay.com>2016-08-03 16:29:45 +0000
commit9d83de42f02b95f8ffa919e797676200fbb45f0f (patch)
tree443cf237c998095ba75715ff59f91fbd68c9fbe0 /lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp
parentf5830974342a2c9cf2922415e9ddffee439874c4 (diff)
downloadbcm5719-llvm-9d83de42f02b95f8ffa919e797676200fbb45f0f.tar.gz
bcm5719-llvm-9d83de42f02b95f8ffa919e797676200fbb45f0f.zip
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
Diffstat (limited to 'lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp')
-rw-r--r--lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp2
1 files changed, 1 insertions, 1 deletions
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<llvm::Type *> new_params{orig_type->getNumParams() + 1, nullptr};
unsigned num_params = orig_type->getNumParams();
+ std::vector<llvm::Type *> new_params{num_params + 1, nullptr};
std::vector<llvm::Type *> 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
OpenPOWER on IntegriCloud