[lld] r196891 - Add more const qualifiers.
Rui Ueyama
ruiu at google.com
Mon Dec 9 23:15:57 PST 2013
Author: ruiu
Date: Tue Dec 10 01:15:57 2013
New Revision: 196891
URL: http://llvm.org/viewvc/llvm-project?rev=196891&view=rev
Log:
Add more const qualifiers.
Modified:
lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp
Modified: lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp?rev=196891&r1=196890&r2=196891&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp (original)
+++ lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp Tue Dec 10 01:15:57 2013
@@ -368,10 +368,10 @@ private:
// Returns a list of RVAs that needs to be relocated if the binary is loaded
// at an address different from its preferred one.
- std::vector<uint64_t> listRelocSites(ChunkVectorT &chunks);
+ std::vector<uint64_t> listRelocSites(ChunkVectorT &chunks) const;
// Divide the given RVAs into blocks.
- PageOffsetT groupByPage(std::vector<uint64_t> relocSites) const;
+ PageOffsetT groupByPage(const std::vector<uint64_t> &relocSites) const;
// Create the content of a relocation block.
DefinedAtom *createBaseRelocBlock(const File &file, uint64_t ordinal,
@@ -765,7 +765,8 @@ void BaseRelocChunk::setContents(ChunkVe
// Returns a list of RVAs that needs to be relocated if the binary is loaded
// at an address different from its preferred one.
-std::vector<uint64_t> BaseRelocChunk::listRelocSites(ChunkVectorT &chunks) {
+std::vector<uint64_t>
+BaseRelocChunk::listRelocSites(ChunkVectorT &chunks) const {
std::vector<uint64_t> ret;
for (auto &cp : chunks)
if (SectionChunk *chunk = dyn_cast<SectionChunk>(&*cp))
@@ -775,7 +776,7 @@ std::vector<uint64_t> BaseRelocChunk::li
// Divide the given RVAs into blocks.
BaseRelocChunk::PageOffsetT
-BaseRelocChunk::groupByPage(std::vector<uint64_t> relocSites) const {
+BaseRelocChunk::groupByPage(const std::vector<uint64_t> &relocSites) const {
PageOffsetT blocks;
uint64_t mask = static_cast<uint64_t>(PAGE_SIZE) - 1;
for (uint64_t addr : relocSites)
More information about the llvm-commits
mailing list