Remove unused variables (#569)
* Add compiler error to clang and gcc for unused variables
* Remove unused variables throughout the code
* Fix a bug in get_global_offset that potentially accessed out-of-bounds
memory
* updated related test
* Replace deprecated uses of CreateShuffleVector
* Use aptitude to install gcc-7
diff --git a/lib/MultiVersionUBOFunctionsPass.cpp b/lib/MultiVersionUBOFunctionsPass.cpp
index 5d7701a..307407d 100644
--- a/lib/MultiVersionUBOFunctionsPass.cpp
+++ b/lib/MultiVersionUBOFunctionsPass.cpp
@@ -223,7 +223,7 @@
IRBuilder<> builder(&*where);
auto new_arg_iter = clone->arg_begin();
- for (auto &arg : fn->args()) {
+ for (size_t i = 0; i < fn->arg_size(); ++i) {
++new_arg_iter;
}
for (auto info : resources) {