forked from OSchip/llvm-project
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
This commit is contained in:
parent
f583097434
commit
9d83de42f0
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue