summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Bitcode')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp42
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp85
-rw-r--r--llvm/lib/Bitcode/Writer/ValueEnumerator.cpp8
-rw-r--r--llvm/lib/Bitcode/Writer/ValueEnumerator.h8
4 files changed, 71 insertions, 72 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index b76b134b760..565e46bd820 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -1724,7 +1724,7 @@ std::error_code BitcodeReader::ParseMetadata() {
Metadata *InlinedAt =
Record[4] ? MDValueList.getValueFwdRef(Record[4] - 1) : nullptr;
MDValueList.AssignValue(
- GET_OR_DISTINCT(MDLocation, Record[0],
+ GET_OR_DISTINCT(DILocation, Record[0],
(Context, Line, Column, Scope, InlinedAt)),
NextMDValueNo++);
break;
@@ -1744,7 +1744,7 @@ std::error_code BitcodeReader::ParseMetadata() {
for (unsigned I = 4, E = Record.size(); I != E; ++I)
DwarfOps.push_back(Record[I] ? MDValueList.getValueFwdRef(Record[I] - 1)
: nullptr);
- MDValueList.AssignValue(GET_OR_DISTINCT(GenericDebugNode, Record[0],
+ MDValueList.AssignValue(GET_OR_DISTINCT(GenericDINode, Record[0],
(Context, Tag, Header, DwarfOps)),
NextMDValueNo++);
break;
@@ -1754,7 +1754,7 @@ std::error_code BitcodeReader::ParseMetadata() {
return Error("Invalid record");
MDValueList.AssignValue(
- GET_OR_DISTINCT(MDSubrange, Record[0],
+ GET_OR_DISTINCT(DISubrange, Record[0],
(Context, Record[1], unrotateSign(Record[2]))),
NextMDValueNo++);
break;
@@ -1763,7 +1763,7 @@ std::error_code BitcodeReader::ParseMetadata() {
if (Record.size() != 3)
return Error("Invalid record");
- MDValueList.AssignValue(GET_OR_DISTINCT(MDEnumerator, Record[0],
+ MDValueList.AssignValue(GET_OR_DISTINCT(DIEnumerator, Record[0],
(Context, unrotateSign(Record[1]),
getMDString(Record[2]))),
NextMDValueNo++);
@@ -1774,7 +1774,7 @@ std::error_code BitcodeReader::ParseMetadata() {
return Error("Invalid record");
MDValueList.AssignValue(
- GET_OR_DISTINCT(MDBasicType, Record[0],
+ GET_OR_DISTINCT(DIBasicType, Record[0],
(Context, Record[1], getMDString(Record[2]),
Record[3], Record[4], Record[5])),
NextMDValueNo++);
@@ -1785,7 +1785,7 @@ std::error_code BitcodeReader::ParseMetadata() {
return Error("Invalid record");
MDValueList.AssignValue(
- GET_OR_DISTINCT(MDDerivedType, Record[0],
+ GET_OR_DISTINCT(DIDerivedType, Record[0],
(Context, Record[1], getMDString(Record[2]),
getMDOrNull(Record[3]), Record[4],
getMDOrNull(Record[5]), getMDOrNull(Record[6]),
@@ -1799,7 +1799,7 @@ std::error_code BitcodeReader::ParseMetadata() {
return Error("Invalid record");
MDValueList.AssignValue(
- GET_OR_DISTINCT(MDCompositeType, Record[0],
+ GET_OR_DISTINCT(DICompositeType, Record[0],
(Context, Record[1], getMDString(Record[2]),
getMDOrNull(Record[3]), Record[4],
getMDOrNull(Record[5]), getMDOrNull(Record[6]),
@@ -1815,7 +1815,7 @@ std::error_code BitcodeReader::ParseMetadata() {
return Error("Invalid record");
MDValueList.AssignValue(
- GET_OR_DISTINCT(MDSubroutineType, Record[0],
+ GET_OR_DISTINCT(DISubroutineType, Record[0],
(Context, Record[1], getMDOrNull(Record[2]))),
NextMDValueNo++);
break;
@@ -1825,7 +1825,7 @@ std::error_code BitcodeReader::ParseMetadata() {
return Error("Invalid record");
MDValueList.AssignValue(
- GET_OR_DISTINCT(MDFile, Record[0], (Context, getMDString(Record[1]),
+ GET_OR_DISTINCT(DIFile, Record[0], (Context, getMDString(Record[1]),
getMDString(Record[2]))),
NextMDValueNo++);
break;
@@ -1835,7 +1835,7 @@ std::error_code BitcodeReader::ParseMetadata() {
return Error("Invalid record");
MDValueList.AssignValue(
- GET_OR_DISTINCT(MDCompileUnit, Record[0],
+ GET_OR_DISTINCT(DICompileUnit, Record[0],
(Context, Record[1], getMDOrNull(Record[2]),
getMDString(Record[3]), Record[4],
getMDString(Record[5]), Record[6],
@@ -1852,7 +1852,7 @@ std::error_code BitcodeReader::ParseMetadata() {
MDValueList.AssignValue(
GET_OR_DISTINCT(
- MDSubprogram, Record[0],
+ DISubprogram, Record[0],
(Context, getMDOrNull(Record[1]), getMDString(Record[2]),
getMDString(Record[3]), getMDOrNull(Record[4]), Record[5],
getMDOrNull(Record[6]), Record[7], Record[8], Record[9],
@@ -1867,7 +1867,7 @@ std::error_code BitcodeReader::ParseMetadata() {
return Error("Invalid record");
MDValueList.AssignValue(
- GET_OR_DISTINCT(MDLexicalBlock, Record[0],
+ GET_OR_DISTINCT(DILexicalBlock, Record[0],
(Context, getMDOrNull(Record[1]),
getMDOrNull(Record[2]), Record[3], Record[4])),
NextMDValueNo++);
@@ -1878,7 +1878,7 @@ std::error_code BitcodeReader::ParseMetadata() {
return Error("Invalid record");
MDValueList.AssignValue(
- GET_OR_DISTINCT(MDLexicalBlockFile, Record[0],
+ GET_OR_DISTINCT(DILexicalBlockFile, Record[0],
(Context, getMDOrNull(Record[1]),
getMDOrNull(Record[2]), Record[3])),
NextMDValueNo++);
@@ -1889,7 +1889,7 @@ std::error_code BitcodeReader::ParseMetadata() {
return Error("Invalid record");
MDValueList.AssignValue(
- GET_OR_DISTINCT(MDNamespace, Record[0],
+ GET_OR_DISTINCT(DINamespace, Record[0],
(Context, getMDOrNull(Record[1]),
getMDOrNull(Record[2]), getMDString(Record[3]),
Record[4])),
@@ -1900,7 +1900,7 @@ std::error_code BitcodeReader::ParseMetadata() {
if (Record.size() != 3)
return Error("Invalid record");
- MDValueList.AssignValue(GET_OR_DISTINCT(MDTemplateTypeParameter,
+ MDValueList.AssignValue(GET_OR_DISTINCT(DITemplateTypeParameter,
Record[0],
(Context, getMDString(Record[1]),
getMDOrNull(Record[2]))),
@@ -1912,7 +1912,7 @@ std::error_code BitcodeReader::ParseMetadata() {
return Error("Invalid record");
MDValueList.AssignValue(
- GET_OR_DISTINCT(MDTemplateValueParameter, Record[0],
+ GET_OR_DISTINCT(DITemplateValueParameter, Record[0],
(Context, Record[1], getMDString(Record[2]),
getMDOrNull(Record[3]), getMDOrNull(Record[4]))),
NextMDValueNo++);
@@ -1923,7 +1923,7 @@ std::error_code BitcodeReader::ParseMetadata() {
return Error("Invalid record");
MDValueList.AssignValue(
- GET_OR_DISTINCT(MDGlobalVariable, Record[0],
+ GET_OR_DISTINCT(DIGlobalVariable, Record[0],
(Context, getMDOrNull(Record[1]),
getMDString(Record[2]), getMDString(Record[3]),
getMDOrNull(Record[4]), Record[5],
@@ -1938,7 +1938,7 @@ std::error_code BitcodeReader::ParseMetadata() {
return Error("Invalid record");
MDValueList.AssignValue(
- GET_OR_DISTINCT(MDLocalVariable, Record[0],
+ GET_OR_DISTINCT(DILocalVariable, Record[0],
(Context, Record[1], getMDOrNull(Record[2]),
getMDString(Record[3]), getMDOrNull(Record[4]),
Record[5], getMDOrNull(Record[6]), Record[7],
@@ -1951,7 +1951,7 @@ std::error_code BitcodeReader::ParseMetadata() {
return Error("Invalid record");
MDValueList.AssignValue(
- GET_OR_DISTINCT(MDExpression, Record[0],
+ GET_OR_DISTINCT(DIExpression, Record[0],
(Context, makeArrayRef(Record).slice(1))),
NextMDValueNo++);
break;
@@ -1961,7 +1961,7 @@ std::error_code BitcodeReader::ParseMetadata() {
return Error("Invalid record");
MDValueList.AssignValue(
- GET_OR_DISTINCT(MDObjCProperty, Record[0],
+ GET_OR_DISTINCT(DIObjCProperty, Record[0],
(Context, getMDString(Record[1]),
getMDOrNull(Record[2]), Record[3],
getMDString(Record[4]), getMDString(Record[5]),
@@ -1974,7 +1974,7 @@ std::error_code BitcodeReader::ParseMetadata() {
return Error("Invalid record");
MDValueList.AssignValue(
- GET_OR_DISTINCT(MDImportedEntity, Record[0],
+ GET_OR_DISTINCT(DIImportedEntity, Record[0],
(Context, Record[1], getMDOrNull(Record[2]),
getMDOrNull(Record[3]), Record[4],
getMDString(Record[5]))),
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index 15b0106ef54..85a6da33a6e 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -784,7 +784,7 @@ static void WriteMDTuple(const MDTuple *N, const ValueEnumerator &VE,
Record.clear();
}
-static void WriteMDLocation(const MDLocation *N, const ValueEnumerator &VE,
+static void WriteDILocation(const DILocation *N, const ValueEnumerator &VE,
BitstreamWriter &Stream,
SmallVectorImpl<uint64_t> &Record,
unsigned Abbrev) {
@@ -798,11 +798,11 @@ static void WriteMDLocation(const MDLocation *N, const ValueEnumerator &VE,
Record.clear();
}
-static void WriteGenericDebugNode(const GenericDebugNode *N,
- const ValueEnumerator &VE,
- BitstreamWriter &Stream,
- SmallVectorImpl<uint64_t> &Record,
- unsigned Abbrev) {
+static void WriteGenericDINode(const GenericDINode *N,
+ const ValueEnumerator &VE,
+ BitstreamWriter &Stream,
+ SmallVectorImpl<uint64_t> &Record,
+ unsigned Abbrev) {
Record.push_back(N->isDistinct());
Record.push_back(N->getTag());
Record.push_back(0); // Per-tag version field; unused for now.
@@ -819,7 +819,7 @@ static uint64_t rotateSign(int64_t I) {
return I < 0 ? ~(U << 1) : U << 1;
}
-static void WriteMDSubrange(const MDSubrange *N, const ValueEnumerator &,
+static void WriteDISubrange(const DISubrange *N, const ValueEnumerator &,
BitstreamWriter &Stream,
SmallVectorImpl<uint64_t> &Record,
unsigned Abbrev) {
@@ -831,7 +831,7 @@ static void WriteMDSubrange(const MDSubrange *N, const ValueEnumerator &,
Record.clear();
}
-static void WriteMDEnumerator(const MDEnumerator *N, const ValueEnumerator &VE,
+static void WriteDIEnumerator(const DIEnumerator *N, const ValueEnumerator &VE,
BitstreamWriter &Stream,
SmallVectorImpl<uint64_t> &Record,
unsigned Abbrev) {
@@ -843,7 +843,7 @@ static void WriteMDEnumerator(const MDEnumerator *N, const ValueEnumerator &VE,
Record.clear();
}
-static void WriteMDBasicType(const MDBasicType *N, const ValueEnumerator &VE,
+static void WriteDIBasicType(const DIBasicType *N, const ValueEnumerator &VE,
BitstreamWriter &Stream,
SmallVectorImpl<uint64_t> &Record,
unsigned Abbrev) {
@@ -858,7 +858,7 @@ static void WriteMDBasicType(const MDBasicType *N, const ValueEnumerator &VE,
Record.clear();
}
-static void WriteMDDerivedType(const MDDerivedType *N,
+static void WriteDIDerivedType(const DIDerivedType *N,
const ValueEnumerator &VE,
BitstreamWriter &Stream,
SmallVectorImpl<uint64_t> &Record,
@@ -880,7 +880,7 @@ static void WriteMDDerivedType(const MDDerivedType *N,
Record.clear();
}
-static void WriteMDCompositeType(const MDCompositeType *N,
+static void WriteDICompositeType(const DICompositeType *N,
const ValueEnumerator &VE,
BitstreamWriter &Stream,
SmallVectorImpl<uint64_t> &Record,
@@ -906,7 +906,7 @@ static void WriteMDCompositeType(const MDCompositeType *N,
Record.clear();
}
-static void WriteMDSubroutineType(const MDSubroutineType *N,
+static void WriteDISubroutineType(const DISubroutineType *N,
const ValueEnumerator &VE,
BitstreamWriter &Stream,
SmallVectorImpl<uint64_t> &Record,
@@ -919,7 +919,7 @@ static void WriteMDSubroutineType(const MDSubroutineType *N,
Record.clear();
}
-static void WriteMDFile(const MDFile *N, const ValueEnumerator &VE,
+static void WriteDIFile(const DIFile *N, const ValueEnumerator &VE,
BitstreamWriter &Stream,
SmallVectorImpl<uint64_t> &Record, unsigned Abbrev) {
Record.push_back(N->isDistinct());
@@ -930,7 +930,7 @@ static void WriteMDFile(const MDFile *N, const ValueEnumerator &VE,
Record.clear();
}
-static void WriteMDCompileUnit(const MDCompileUnit *N,
+static void WriteDICompileUnit(const DICompileUnit *N,
const ValueEnumerator &VE,
BitstreamWriter &Stream,
SmallVectorImpl<uint64_t> &Record,
@@ -954,11 +954,10 @@ static void WriteMDCompileUnit(const MDCompileUnit *N,
Record.clear();
}
-static void WriteMDSubprogram(const MDSubprogram *N,
- const ValueEnumerator &VE,
- BitstreamWriter &Stream,
- SmallVectorImpl<uint64_t> &Record,
- unsigned Abbrev) {
+static void WriteDISubprogram(const DISubprogram *N, const ValueEnumerator &VE,
+ BitstreamWriter &Stream,
+ SmallVectorImpl<uint64_t> &Record,
+ unsigned Abbrev) {
Record.push_back(N->isDistinct());
Record.push_back(VE.getMetadataOrNullID(N->getScope()));
Record.push_back(VE.getMetadataOrNullID(N->getRawName()));
@@ -983,11 +982,11 @@ static void WriteMDSubprogram(const MDSubprogram *N,
Record.clear();
}
-static void WriteMDLexicalBlock(const MDLexicalBlock *N,
- const ValueEnumerator &VE,
- BitstreamWriter &Stream,
- SmallVectorImpl<uint64_t> &Record,
- unsigned Abbrev) {
+static void WriteDILexicalBlock(const DILexicalBlock *N,
+ const ValueEnumerator &VE,
+ BitstreamWriter &Stream,
+ SmallVectorImpl<uint64_t> &Record,
+ unsigned Abbrev) {
Record.push_back(N->isDistinct());
Record.push_back(VE.getMetadataOrNullID(N->getScope()));
Record.push_back(VE.getMetadataOrNullID(N->getFile()));
@@ -998,7 +997,7 @@ static void WriteMDLexicalBlock(const MDLexicalBlock *N,
Record.clear();
}
-static void WriteMDLexicalBlockFile(const MDLexicalBlockFile *N,
+static void WriteDILexicalBlockFile(const DILexicalBlockFile *N,
const ValueEnumerator &VE,
BitstreamWriter &Stream,
SmallVectorImpl<uint64_t> &Record,
@@ -1012,7 +1011,7 @@ static void WriteMDLexicalBlockFile(const MDLexicalBlockFile *N,
Record.clear();
}
-static void WriteMDNamespace(const MDNamespace *N, const ValueEnumerator &VE,
+static void WriteDINamespace(const DINamespace *N, const ValueEnumerator &VE,
BitstreamWriter &Stream,
SmallVectorImpl<uint64_t> &Record,
unsigned Abbrev) {
@@ -1026,7 +1025,7 @@ static void WriteMDNamespace(const MDNamespace *N, const ValueEnumerator &VE,
Record.clear();
}
-static void WriteMDTemplateTypeParameter(const MDTemplateTypeParameter *N,
+static void WriteDITemplateTypeParameter(const DITemplateTypeParameter *N,
const ValueEnumerator &VE,
BitstreamWriter &Stream,
SmallVectorImpl<uint64_t> &Record,
@@ -1039,7 +1038,7 @@ static void WriteMDTemplateTypeParameter(const MDTemplateTypeParameter *N,
Record.clear();
}
-static void WriteMDTemplateValueParameter(const MDTemplateValueParameter *N,
+static void WriteDITemplateValueParameter(const DITemplateValueParameter *N,
const ValueEnumerator &VE,
BitstreamWriter &Stream,
SmallVectorImpl<uint64_t> &Record,
@@ -1054,7 +1053,7 @@ static void WriteMDTemplateValueParameter(const MDTemplateValueParameter *N,
Record.clear();
}
-static void WriteMDGlobalVariable(const MDGlobalVariable *N,
+static void WriteDIGlobalVariable(const DIGlobalVariable *N,
const ValueEnumerator &VE,
BitstreamWriter &Stream,
SmallVectorImpl<uint64_t> &Record,
@@ -1075,7 +1074,7 @@ static void WriteMDGlobalVariable(const MDGlobalVariable *N,
Record.clear();
}
-static void WriteMDLocalVariable(const MDLocalVariable *N,
+static void WriteDILocalVariable(const DILocalVariable *N,
const ValueEnumerator &VE,
BitstreamWriter &Stream,
SmallVectorImpl<uint64_t> &Record,
@@ -1094,7 +1093,7 @@ static void WriteMDLocalVariable(const MDLocalVariable *N,
Record.clear();
}
-static void WriteMDExpression(const MDExpression *N, const ValueEnumerator &,
+static void WriteDIExpression(const DIExpression *N, const ValueEnumerator &,
BitstreamWriter &Stream,
SmallVectorImpl<uint64_t> &Record,
unsigned Abbrev) {
@@ -1107,11 +1106,11 @@ static void WriteMDExpression(const MDExpression *N, const ValueEnumerator &,
Record.clear();
}
-static void WriteMDObjCProperty(const MDObjCProperty *N,
- const ValueEnumerator &VE,
- BitstreamWriter &Stream,
- SmallVectorImpl<uint64_t> &Record,
- unsigned Abbrev) {
+static void WriteDIObjCProperty(const DIObjCProperty *N,
+ const ValueEnumerator &VE,
+ BitstreamWriter &Stream,
+ SmallVectorImpl<uint64_t> &Record,
+ unsigned Abbrev) {
Record.push_back(N->isDistinct());
Record.push_back(VE.getMetadataOrNullID(N->getRawName()));
Record.push_back(VE.getMetadataOrNullID(N->getFile()));
@@ -1125,7 +1124,7 @@ static void WriteMDObjCProperty(const MDObjCProperty *N,
Record.clear();
}
-static void WriteMDImportedEntity(const MDImportedEntity *N,
+static void WriteDIImportedEntity(const DIImportedEntity *N,
const ValueEnumerator &VE,
BitstreamWriter &Stream,
SmallVectorImpl<uint64_t> &Record,
@@ -1164,7 +1163,7 @@ static void WriteModuleMetadata(const Module *M,
#define HANDLE_MDNODE_LEAF(CLASS) unsigned CLASS##Abbrev = 0;
#include "llvm/IR/Metadata.def"
- if (VE.hasMDLocation()) {
+ if (VE.hasDILocation()) {
// Abbrev for METADATA_LOCATION.
//
// Assume the column is usually under 128, and always output the inlined-at
@@ -1176,10 +1175,10 @@ static void WriteModuleMetadata(const Module *M,
Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 8));
Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
- MDLocationAbbrev = Stream.EmitAbbrev(Abbv);
+ DILocationAbbrev = Stream.EmitAbbrev(Abbv);
}
- if (VE.hasGenericDebugNode()) {
+ if (VE.hasGenericDINode()) {
// Abbrev for METADATA_GENERIC_DEBUG.
//
// Assume the column is usually under 128, and always output the inlined-at
@@ -1192,7 +1191,7 @@ static void WriteModuleMetadata(const Module *M,
Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array));
Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
- GenericDebugNodeAbbrev = Stream.EmitAbbrev(Abbv);
+ GenericDINodeAbbrev = Stream.EmitAbbrev(Abbv);
}
unsigned NameAbbrev = 0;
@@ -2105,7 +2104,7 @@ static void WriteFunction(const Function &F, ValueEnumerator &VE,
bool NeedsMetadataAttachment = F.hasMetadata();
- MDLocation *LastDL = nullptr;
+ DILocation *LastDL = nullptr;
// Finally, emit all the instructions, in order.
for (Function::const_iterator BB = F.begin(), E = F.end(); BB != E; ++BB)
@@ -2120,7 +2119,7 @@ static void WriteFunction(const Function &F, ValueEnumerator &VE,
NeedsMetadataAttachment |= I->hasMetadataOtherThanDebugLoc();
// If the instruction has a debug location, emit it.
- MDLocation *DL = I->getDebugLoc();
+ DILocation *DL = I->getDebugLoc();
if (!DL)
continue;
diff --git a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
index 652851f4cc1..6c517f5ed8d 100644
--- a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
+++ b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
@@ -285,7 +285,7 @@ static bool isIntOrIntVectorValue(const std::pair<const Value*, unsigned> &V) {
ValueEnumerator::ValueEnumerator(const Module &M,
bool ShouldPreserveUseListOrder)
- : HasMDString(false), HasMDLocation(false), HasGenericDebugNode(false),
+ : HasMDString(false), HasDILocation(false), HasGenericDINode(false),
ShouldPreserveUseListOrder(ShouldPreserveUseListOrder) {
if (ShouldPreserveUseListOrder)
UseListOrders = predictUseListOrder(M);
@@ -382,7 +382,7 @@ ValueEnumerator::ValueEnumerator(const Module &M,
// Don't enumerate the location directly -- it has a special record
// type -- but enumerate its operands.
- if (MDLocation *L = I.getDebugLoc())
+ if (DILocation *L = I.getDebugLoc())
EnumerateMDNodeOperands(L);
}
}
@@ -548,8 +548,8 @@ void ValueEnumerator::EnumerateMetadata(const Metadata *MD) {
EnumerateValue(C->getValue());
HasMDString |= isa<MDString>(MD);
- HasMDLocation |= isa<MDLocation>(MD);
- HasGenericDebugNode |= isa<GenericDebugNode>(MD);
+ HasDILocation |= isa<DILocation>(MD);
+ HasGenericDINode |= isa<GenericDINode>(MD);
// Replace the dummy ID inserted above with the correct one. MDValueMap may
// have changed by inserting operands, so we need a fresh lookup here.
diff --git a/llvm/lib/Bitcode/Writer/ValueEnumerator.h b/llvm/lib/Bitcode/Writer/ValueEnumerator.h
index ba245a3de68..92d166e3ba9 100644
--- a/llvm/lib/Bitcode/Writer/ValueEnumerator.h
+++ b/llvm/lib/Bitcode/Writer/ValueEnumerator.h
@@ -65,8 +65,8 @@ private:
typedef DenseMap<const Metadata *, unsigned> MetadataMapType;
MetadataMapType MDValueMap;
bool HasMDString;
- bool HasMDLocation;
- bool HasGenericDebugNode;
+ bool HasDILocation;
+ bool HasGenericDINode;
bool ShouldPreserveUseListOrder;
typedef DenseMap<AttributeSet, unsigned> AttributeGroupMapType;
@@ -121,8 +121,8 @@ public:
}
bool hasMDString() const { return HasMDString; }
- bool hasMDLocation() const { return HasMDLocation; }
- bool hasGenericDebugNode() const { return HasGenericDebugNode; }
+ bool hasDILocation() const { return HasDILocation; }
+ bool hasGenericDINode() const { return HasGenericDINode; }
bool shouldPreserveUseListOrder() const { return ShouldPreserveUseListOrder; }
OpenPOWER on IntegriCloud