diff options
author | Georgii Rymar <grimar@accesssoftek.com> | 2020-11-26 10:22:29 +0300 |
---|---|---|
committer | Georgii Rymar <grimar@accesssoftek.com> | 2020-11-26 10:24:24 +0300 |
commit | c3673ea65df576535c85397dfe36624bd09fe47b (patch) | |
tree | d720393dabd523d7a3122b09c56bb642b22e455c | |
parent | 14f2ad0e3cc54d5eb254b545a469e8ffdb62b119 (diff) | |
download | llvm-c3673ea65df576535c85397dfe36624bd09fe47b.zip llvm-c3673ea65df576535c85397dfe36624bd09fe47b.tar.gz llvm-c3673ea65df576535c85397dfe36624bd09fe47b.tar.bz2 |
[llvm-readobj] - Fix a warning.
This addresses post review comment for D92018.
The warning was:
```
error: loop variable 'Note' is always a copy because the range of type 'iterator_range<llvm::object::ELFFile<llvm::object::ELFType<llvm::support::big, true> >::Elf_Note_Iterator>' (aka 'iterator_range<Elf_Note_Iterator_Impl<ELFType<(llvm::support::endianness)0U, true> > >') does not return a reference [-Werror,-Wrange-loop-analysis]
for (const typename ELFT::Note &Note : Obj.notes(S, Err))
```
-rw-r--r-- | llvm/tools/llvm-readobj/ELFDumper.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/llvm-readobj/ELFDumper.cpp b/llvm/tools/llvm-readobj/ELFDumper.cpp index 2fac1c9..656b992 100644 --- a/llvm/tools/llvm-readobj/ELFDumper.cpp +++ b/llvm/tools/llvm-readobj/ELFDumper.cpp @@ -5559,7 +5559,7 @@ static void printNotesHelper( StartNotesFn(expectedToOptional(Obj.getSectionName(S)), S.sh_offset, S.sh_size); Error Err = Error::success(); - for (const typename ELFT::Note &Note : Obj.notes(S, Err)) + for (const typename ELFT::Note Note : Obj.notes(S, Err)) ProcessNoteFn(Note); if (Err) Dumper.reportUniqueWarning( |