From c3673ea65df576535c85397dfe36624bd09fe47b Mon Sep 17 00:00:00 2001 From: Georgii Rymar Date: Thu, 26 Nov 2020 10:22:29 +0300 Subject: [PATCH] [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 >::Elf_Note_Iterator>' (aka 'iterator_range > >') does not return a reference [-Werror,-Wrange-loop-analysis] for (const typename ELFT::Note &Note : Obj.notes(S, Err)) ``` --- llvm/tools/llvm-readobj/ELFDumper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/tools/llvm-readobj/ELFDumper.cpp b/llvm/tools/llvm-readobj/ELFDumper.cpp index 2fac1c970fb3..656b9924ece0 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(