[lld] r286001 - Fix -Wcast-qual warnings.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 4 10:41:30 PDT 2016
Author: ruiu
Date: Fri Nov 4 12:41:29 2016
New Revision: 286001
URL: http://llvm.org/viewvc/llvm-project?rev=286001&view=rev
Log:
Fix -Wcast-qual warnings.
Modified:
lld/trunk/COFF/PDB.cpp
lld/trunk/ELF/SyntheticSections.cpp
Modified: lld/trunk/COFF/PDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/PDB.cpp?rev=286001&r1=286000&r2=286001&view=diff
==============================================================================
--- lld/trunk/COFF/PDB.cpp (original)
+++ lld/trunk/COFF/PDB.cpp Fri Nov 4 12:41:29 2016
@@ -66,7 +66,7 @@ void coff::createPDB(StringRef Path, Arr
// Add Section Map stream.
ArrayRef<object::coff_section> Sections = {
- (object::coff_section *)SectionTable.data(),
+ (const object::coff_section *)SectionTable.data(),
SectionTable.size() / sizeof(object::coff_section)};
std::vector<pdb::SecMapEntry> SectionMap =
pdb::DbiStreamBuilder::createSectionMap(Sections);
Modified: lld/trunk/ELF/SyntheticSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SyntheticSections.cpp?rev=286001&r1=286000&r2=286001&view=diff
==============================================================================
--- lld/trunk/ELF/SyntheticSections.cpp (original)
+++ lld/trunk/ELF/SyntheticSections.cpp Fri Nov 4 12:41:29 2016
@@ -40,7 +40,7 @@ using namespace lld::elf;
static ArrayRef<uint8_t> createInterp() {
// StringSaver guarantees that the returned string ends with '\0'.
StringRef S = Saver.save(Config->DynamicLinker);
- return {(uint8_t *)S.data(), S.size() + 1};
+ return {(const uint8_t *)S.data(), S.size() + 1};
}
template <class ELFT>
More information about the llvm-commits
mailing list