diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-03-24 16:01:46 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-03-24 16:01:46 +0000 |
commit | 0b7243ee38a0445bd654185ce6e0d17c3462e201 (patch) | |
tree | 3e3a75ec31a7e786d3581d811048f8b37b71a042 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | 95f3173ce9ced23549b2e40f8e7d3ba2dd726473 (diff) | |
download | bcm5719-llvm-0b7243ee38a0445bd654185ce6e0d17c3462e201.tar.gz bcm5719-llvm-0b7243ee38a0445bd654185ce6e0d17c3462e201.zip |
Bitcode: Module* -> Module&, NFC
llvm-svn: 264299
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index 26cfe5943e1..83dd5475c24 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -1301,11 +1301,11 @@ static void WriteDIImportedEntity(const DIImportedEntity *N, Record.clear(); } -static void WriteModuleMetadata(const Module *M, +static void WriteModuleMetadata(const Module &M, const ValueEnumerator &VE, BitstreamWriter &Stream) { const auto &MDs = VE.getMDs(); - if (MDs.empty() && M->named_metadata_empty()) + if (MDs.empty() && M.named_metadata_empty()) return; Stream.EnterSubblock(bitc::METADATA_BLOCK_ID, 3); @@ -1356,7 +1356,7 @@ static void WriteModuleMetadata(const Module *M, } unsigned NameAbbrev = 0; - if (!M->named_metadata_empty()) { + if (!M.named_metadata_empty()) { // Abbrev for METADATA_NAME. BitCodeAbbrev *Abbv = new BitCodeAbbrev(); Abbv->Add(BitCodeAbbrevOp(bitc::METADATA_NAME)); @@ -1394,7 +1394,7 @@ static void WriteModuleMetadata(const Module *M, } // Write named metadata. - for (const NamedMDNode &NMD : M->named_metadata()) { + for (const NamedMDNode &NMD : M.named_metadata()) { // Write name. StringRef Str = NMD.getName(); Record.append(Str.bytes_begin(), Str.bytes_end()); @@ -3196,7 +3196,7 @@ static void WriteModule(const Module *M, BitstreamWriter &Stream, WriteModuleConstants(VE, Stream); // Emit metadata. - WriteModuleMetadata(M, VE, Stream); + WriteModuleMetadata(*M, VE, Stream); // Emit metadata. WriteModuleMetadataStore(M, Stream); |