[all-commits] [llvm/llvm-project] ee1a06: [Analysis] Fix gcc warnings about unused variables...
mikaelholmen via All-commits
all-commits at lists.llvm.org
Fri Sep 29 02:26:57 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ee1a06b80fb70a015d0b8a6be55124df3575622a
https://github.com/llvm/llvm-project/commit/ee1a06b80fb70a015d0b8a6be55124df3575622a
Author: Mikael Holmen <mikael.holmen at ericsson.com>
Date: 2023-09-29 (Fri, 29 Sep 2023)
Changed paths:
M llvm/lib/Analysis/LazyValueInfo.cpp
Log Message:
-----------
[Analysis] Fix gcc warnings about unused variables [NFC]
gcc warned with:
[236/4788] Building CXX object lib/Analysis/CMakeFiles/LLVMAnalysis.dir/LazyValueInfo.cpp.o
../lib/Analysis/LazyValueInfo.cpp: In member function 'void llvm::LazyValueInfo::forgetValue(llvm::Value*)':
../lib/Analysis/LazyValueInfo.cpp:1978:13: warning: unused variable 'Impl' [-Wunused-variable]
1978 | if (auto *Impl = getImpl())
| ^~~~
../lib/Analysis/LazyValueInfo.cpp: In member function 'void llvm::LazyValueInfo::eraseBlock(llvm::BasicBlock*)':
../lib/Analysis/LazyValueInfo.cpp:1983:13: warning: unused variable 'Impl' [-Wunused-variable]
1983 | if (auto *Impl = getImpl())
| ^~~~
../lib/Analysis/LazyValueInfo.cpp: In member function 'void llvm::LazyValueInfo::clear()':
../lib/Analysis/LazyValueInfo.cpp:1988:13: warning: unused variable 'Impl' [-Wunused-variable]
1988 | if (auto *Impl = getImpl())
| ^~~~
../lib/Analysis/LazyValueInfo.cpp: In member function 'void llvm::LazyValueInfo::printLVI(llvm::Function&, llvm::DominatorTree&, llvm::raw_ostream&)':
../lib/Analysis/LazyValueInfo.cpp:1993:13: warning: unused variable 'Impl' [-Wunused-variable]
1993 | if (auto *Impl = getImpl())
| ^~~~
Use the locals instead of calling getImpl() again.
More information about the All-commits
mailing list