[llvm] r264299 - Bitcode: Module* -> Module&, NFC
Duncan P. N. Exon Smith via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 24 09:01:46 PDT 2016
Author: dexonsmith
Date: Thu Mar 24 11:01:46 2016
New Revision: 264299
URL: http://llvm.org/viewvc/llvm-project?rev=264299&view=rev
Log:
Bitcode: Module* -> Module&, NFC
Modified:
llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
Modified: llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp?rev=264299&r1=264298&r2=264299&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp (original)
+++ llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp Thu Mar 24 11:01:46 2016
@@ -1301,11 +1301,11 @@ static void WriteDIImportedEntity(const
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 Mo
}
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 Mo
}
// 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,
WriteModuleConstants(VE, Stream);
// Emit metadata.
- WriteModuleMetadata(M, VE, Stream);
+ WriteModuleMetadata(*M, VE, Stream);
// Emit metadata.
WriteModuleMetadataStore(M, Stream);
More information about the llvm-commits
mailing list