summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Writer
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2016-08-19 06:06:18 +0000
committerMehdi Amini <mehdi.amini@apple.com>2016-08-19 06:06:18 +0000
commitcc1fe9b9d6e4aca86633d72c933413c28e8d0726 (patch)
tree785391700b48707596e71bc0d242972afc686c16 /llvm/lib/Bitcode/Writer
parent026ddbb4d66793067dce6b9eeaea9181e8ea35fd (diff)
downloadbcm5719-llvm-cc1fe9b9d6e4aca86633d72c933413c28e8d0726.tar.gz
bcm5719-llvm-cc1fe9b9d6e4aca86633d72c933413c28e8d0726.zip
Constify some path in the bitcode writer (NFC)
llvm-svn: 279211
Diffstat (limited to 'llvm/lib/Bitcode/Writer')
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index eadef182446..428bb11a33d 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -316,7 +316,7 @@ class IndexBitcodeWriter : public BitcodeWriter {
/// When writing a subset of the index for distributed backends, client
/// provides a map of modules to the corresponding GUIDs/summaries to write.
- std::map<std::string, GVSummaryMapTy> *ModuleToSummariesForIndex;
+ const std::map<std::string, GVSummaryMapTy> *ModuleToSummariesForIndex;
/// Map that holds the correspondence between the GUID used in the combined
/// index and a value id generated by this class to use in references.
@@ -331,7 +331,7 @@ public:
/// for a distributed backend, provide a \p ModuleToSummariesForIndex map.
IndexBitcodeWriter(SmallVectorImpl<char> &Buffer,
const ModuleSummaryIndex &Index,
- std::map<std::string, GVSummaryMapTy>
+ const std::map<std::string, GVSummaryMapTy>
*ModuleToSummariesForIndex = nullptr)
: BitcodeWriter(Buffer), Index(Index),
ModuleToSummariesForIndex(ModuleToSummariesForIndex) {
@@ -359,11 +359,11 @@ public:
// ModuleToSummariesForIndex map:
/// Points to the last element in outer ModuleToSummariesForIndex map.
- std::map<std::string, GVSummaryMapTy>::iterator ModuleSummariesBack;
+ std::map<std::string, GVSummaryMapTy>::const_iterator ModuleSummariesBack;
/// Iterator on outer ModuleToSummariesForIndex map.
- std::map<std::string, GVSummaryMapTy>::iterator ModuleSummariesIter;
+ std::map<std::string, GVSummaryMapTy>::const_iterator ModuleSummariesIter;
/// Iterator on an inner global variable summary map.
- GVSummaryMapTy::iterator ModuleGVSummariesIter;
+ GVSummaryMapTy::const_iterator ModuleGVSummariesIter;
// Iterators used when writing all summaries in the index:
@@ -3840,7 +3840,7 @@ void IndexBitcodeWriter::writeIndex() {
// index for a distributed backend, provide a \p ModuleToSummariesForIndex map.
void llvm::WriteIndexToFile(
const ModuleSummaryIndex &Index, raw_ostream &Out,
- std::map<std::string, GVSummaryMapTy> *ModuleToSummariesForIndex) {
+ const std::map<std::string, GVSummaryMapTy> *ModuleToSummariesForIndex) {
SmallVector<char, 0> Buffer;
Buffer.reserve(256 * 1024);
OpenPOWER on IntegriCloud