[lld] r260871 - ELF: silence -Wcast-qual warnings from GCC
Saleem Abdulrasool via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 14 19:45:18 PST 2016
Author: compnerd
Date: Sun Feb 14 21:45:18 2016
New Revision: 260871
URL: http://llvm.org/viewvc/llvm-project?rev=260871&view=rev
Log:
ELF: silence -Wcast-qual warnings from GCC
Silence 4 -Wcast-qual warnings from GCC 5.1. NFC.
Modified:
lld/trunk/ELF/OutputSections.cpp
Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=260871&r1=260870&r2=260871&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Sun Feb 14 21:45:18 2016
@@ -1027,10 +1027,10 @@ uint8_t EHOutputSection<ELFT>::getFdeEnc
if (Version != 1 && Version != 3)
fatal("FDE version 1 or 3 expected, but got " + Twine((unsigned)Version));
- auto AugEnd = std::find(D.begin() + 1, D.end(), '\0');
+ const unsigned char *AugEnd = std::find(D.begin() + 1, D.end(), '\0');
if (AugEnd == D.end())
fatal("corrupted CIE");
- StringRef Aug((char *)D.begin(), AugEnd - D.begin());
+ StringRef Aug(reinterpret_cast<const char *>(D.begin()), AugEnd - D.begin());
D = D.slice(Aug.size() + 1);
// Code alignment factor should always be 1 for .eh_frame.
More information about the llvm-commits
mailing list