summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Writer
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-02-04 21:54:12 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-02-04 21:54:12 +0000
commit6b7b680efdf8f6f66d3914c1856ca2ce8cd4618c (patch)
tree2852085702f1564f25c94068060c504eb8bd4446 /llvm/lib/Bitcode/Writer
parent4d1a79b8c046eef6b1c37498856f571f94c6c12c (diff)
downloadbcm5719-llvm-6b7b680efdf8f6f66d3914c1856ca2ce8cd4618c.tar.gz
bcm5719-llvm-6b7b680efdf8f6f66d3914c1856ca2ce8cd4618c.zip
IR: Initialize MDNode abbreviations en masse, NFC
llvm-svn: 228203
Diffstat (limited to 'llvm/lib/Bitcode/Writer')
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index 5b502bce2bc..6f8c26069a6 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -828,7 +828,10 @@ static void WriteModuleMetadata(const Module *M,
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 Module *M,
MDLocationAbbrev = Stream.EmitAbbrev(Abbv);
}
- unsigned GenericDebugNodeAbbrev = 0;
if (VE.hasGenericDebugNode()) {
// Abbrev for METADATA_GENERIC_DEBUG.
//
@@ -871,7 +873,6 @@ static void WriteModuleMetadata(const Module *M,
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)) {
OpenPOWER on IntegriCloud