diff options
| author | Rui Ueyama <ruiu@google.com> | 2013-12-10 07:15:57 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2013-12-10 07:15:57 +0000 |
| commit | 27964e663b3fced13dab38cb5af3d33823f340b6 (patch) | |
| tree | 53ad3e35b741e3aefab6132a971e9d0dcb39ffc1 | |
| parent | 17e663154a35ca7cdc2e091d2044ffb339efe2e7 (diff) | |
| download | bcm5719-llvm-27964e663b3fced13dab38cb5af3d33823f340b6.tar.gz bcm5719-llvm-27964e663b3fced13dab38cb5af3d33823f340b6.zip | |
Add more const qualifiers.
llvm-svn: 196891
| -rw-r--r-- | lld/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lld/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp b/lld/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp index c70a3c1afe7..528b618e5d7 100644 --- a/lld/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp +++ b/lld/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp @@ -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(ChunkVectorT &chunks) { // 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::listRelocSites(ChunkVectorT &chunks) { // 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) |

