[llvm] r228203 - IR: Initialize MDNode abbreviations en masse, NFC
Duncan P. N. Exon Smith
dexonsmith at apple.com
Wed Feb 4 13:54:13 PST 2015
Author: dexonsmith
Date: Wed Feb 4 15:54:12 2015
New Revision: 228203
URL: http://llvm.org/viewvc/llvm-project?rev=228203&view=rev
Log:
IR: Initialize MDNode abbreviations en masse, 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=228203&r1=228202&r2=228203&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp (original)
+++ llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp Wed Feb 4 15:54:12 2015
@@ -828,7 +828,10 @@ static void WriteModuleMetadata(const Mo
MDSAbbrev = Stream.EmitAbbrev(Abbv);
}
- unsigned MDLocationAbbrev = 0;
+ // Initialize MDNode abbreviations.
+#define HANDLE_MDNODE_LEAF(CLASS) unsigned CLASS##Abbrev = 0;
+#include "llvm/IR/Metadata.def"
+
if (VE.hasMDLocation()) {
// Abbrev for METADATA_LOCATION.
//
@@ -844,7 +847,6 @@ static void WriteModuleMetadata(const Mo
MDLocationAbbrev = Stream.EmitAbbrev(Abbv);
}
- unsigned GenericDebugNodeAbbrev = 0;
if (VE.hasGenericDebugNode()) {
// Abbrev for METADATA_GENERIC_DEBUG.
//
@@ -871,7 +873,6 @@ static void WriteModuleMetadata(const Mo
NameAbbrev = Stream.EmitAbbrev(Abbv);
}
- unsigned MDTupleAbbrev = 0;
SmallVector<uint64_t, 64> Record;
for (const Metadata *MD : MDs) {
if (const MDNode *N = dyn_cast<MDNode>(MD)) {
More information about the llvm-commits
mailing list