summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-01-22 22:47:44 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-01-22 22:47:44 +0000
commite8b5e49ffd3f21f80bceab0f9baeb35331106d55 (patch)
treea425f5b442d5e8eb03d0bf0cb4d9d9ee61ff707f /llvm/lib
parent7e6d573e87f3f8f912ab6d86857759e4b99e239e (diff)
downloadbcm5719-llvm-e8b5e49ffd3f21f80bceab0f9baeb35331106d55.tar.gz
bcm5719-llvm-e8b5e49ffd3f21f80bceab0f9baeb35331106d55.zip
IR: DwarfNode => DebugNode, NFC
These things are potentially used for non-DWARF data (see the discussion in PR22235), so take the `Dwarf` out of the name. Since the new name gives fewer clues, update the doxygen to properly describe what they are. llvm-svn: 226874
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp4
-rw-r--r--llvm/lib/IR/AsmWriter.cpp2
-rw-r--r--llvm/lib/IR/LLVMContextImpl.h28
-rw-r--r--llvm/lib/IR/Metadata.cpp14
4 files changed, 24 insertions, 24 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index 567e935cfa3..118edc15ce6 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -791,7 +791,7 @@ static void WriteMDLocation(const MDLocation *N, const ValueEnumerator &VE,
Record.clear();
}
-static void WriteGenericDwarfNode(const GenericDwarfNode *,
+static void WriteGenericDebugNode(const GenericDebugNode *,
const ValueEnumerator &, BitstreamWriter &,
SmallVectorImpl<uint64_t> &, unsigned) {
llvm_unreachable("unimplemented");
@@ -843,7 +843,7 @@ static void WriteModuleMetadata(const Module *M,
}
unsigned MDTupleAbbrev = 0;
- unsigned GenericDwarfNodeAbbrev = 0;
+ unsigned GenericDebugNodeAbbrev = 0;
SmallVector<uint64_t, 64> Record;
for (const Metadata *MD : MDs) {
if (const MDNode *N = dyn_cast<MDNode>(MD)) {
diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp
index 56355cc913c..d52ac87c983 100644
--- a/llvm/lib/IR/AsmWriter.cpp
+++ b/llvm/lib/IR/AsmWriter.cpp
@@ -1286,7 +1286,7 @@ raw_ostream &operator<<(raw_ostream &OS, FieldSeparator &FS) {
}
} // end namespace
-static void writeGenericDwarfNode(raw_ostream &, const GenericDwarfNode *,
+static void writeGenericDebugNode(raw_ostream &, const GenericDebugNode *,
TypePrinting *, SlotTracker *,
const Module *) {
llvm_unreachable("Unimplemented write");
diff --git a/llvm/lib/IR/LLVMContextImpl.h b/llvm/lib/IR/LLVMContextImpl.h
index 4d3fa4462a3..a009262f80e 100644
--- a/llvm/lib/IR/LLVMContextImpl.h
+++ b/llvm/lib/IR/LLVMContextImpl.h
@@ -284,44 +284,44 @@ struct MDLocationInfo {
}
};
-/// \brief DenseMapInfo for GenericDwarfNode.
-struct GenericDwarfNodeInfo {
+/// \brief DenseMapInfo for GenericDebugNode.
+struct GenericDebugNodeInfo {
struct KeyTy : MDNodeOpsKey {
unsigned Tag;
MDString *Header;
KeyTy(unsigned Tag, MDString *Header, ArrayRef<Metadata *> DwarfOps)
: MDNodeOpsKey(DwarfOps), Tag(Tag), Header(Header) {}
- KeyTy(GenericDwarfNode *N)
+ KeyTy(GenericDebugNode *N)
: MDNodeOpsKey(N, 1), Tag(N->getTag()), Header(N->getHeader()) {}
- bool operator==(const GenericDwarfNode *RHS) const {
+ bool operator==(const GenericDebugNode *RHS) const {
if (RHS == getEmptyKey() || RHS == getTombstoneKey())
return false;
return Tag == RHS->getTag() && Header == RHS->getHeader() &&
compareOps(RHS, 1);
}
- static unsigned calculateHash(GenericDwarfNode *N) {
+ static unsigned calculateHash(GenericDebugNode *N) {
return MDNodeOpsKey::calculateHash(N, 1);
}
};
- static inline GenericDwarfNode *getEmptyKey() {
- return DenseMapInfo<GenericDwarfNode *>::getEmptyKey();
+ static inline GenericDebugNode *getEmptyKey() {
+ return DenseMapInfo<GenericDebugNode *>::getEmptyKey();
}
- static inline GenericDwarfNode *getTombstoneKey() {
- return DenseMapInfo<GenericDwarfNode *>::getTombstoneKey();
+ static inline GenericDebugNode *getTombstoneKey() {
+ return DenseMapInfo<GenericDebugNode *>::getTombstoneKey();
}
static unsigned getHashValue(const KeyTy &Key) {
return hash_combine(Key.getHash(), Key.Tag, Key.Header);
}
- static unsigned getHashValue(const GenericDwarfNode *U) {
+ static unsigned getHashValue(const GenericDebugNode *U) {
return hash_combine(U->getHash(), U->getTag(), U->getHeader());
}
- static bool isEqual(const KeyTy &LHS, const GenericDwarfNode *RHS) {
+ static bool isEqual(const KeyTy &LHS, const GenericDebugNode *RHS) {
return LHS == RHS;
}
- static bool isEqual(const GenericDwarfNode *LHS,
- const GenericDwarfNode *RHS) {
+ static bool isEqual(const GenericDebugNode *LHS,
+ const GenericDebugNode *RHS) {
return LHS == RHS;
}
};
@@ -358,7 +358,7 @@ public:
DenseSet<MDTuple *, MDTupleInfo> MDTuples;
DenseSet<MDLocation *, MDLocationInfo> MDLocations;
- DenseSet<GenericDwarfNode *, GenericDwarfNodeInfo> GenericDwarfNodes;
+ DenseSet<GenericDebugNode *, GenericDebugNodeInfo> GenericDebugNodes;
// MDNodes may be uniqued or not uniqued. When they're not uniqued, they
// aren't in the MDNodeSet, but they're still shared between objects, so no
diff --git a/llvm/lib/IR/Metadata.cpp b/llvm/lib/IR/Metadata.cpp
index fac9268f786..e55d287e63a 100644
--- a/llvm/lib/IR/Metadata.cpp
+++ b/llvm/lib/IR/Metadata.cpp
@@ -541,8 +541,8 @@ void MDTuple::recalculateHash() {
setHash(MDTupleInfo::KeyTy::calculateHash(this));
}
-void GenericDwarfNode::recalculateHash() {
- setHash(GenericDwarfNodeInfo::KeyTy::calculateHash(this));
+void GenericDebugNode::recalculateHash() {
+ setHash(GenericDebugNodeInfo::KeyTy::calculateHash(this));
}
void MDNode::dropAllReferences() {
@@ -759,7 +759,7 @@ MDLocation *MDLocation::getImpl(LLVMContext &Context, unsigned Line,
Storage, Context.pImpl->MDLocations);
}
-GenericDwarfNode *GenericDwarfNode::getImpl(LLVMContext &Context, unsigned Tag,
+GenericDebugNode *GenericDebugNode::getImpl(LLVMContext &Context, unsigned Tag,
MDString *Header,
ArrayRef<Metadata *> DwarfOps,
StorageType Storage,
@@ -770,8 +770,8 @@ GenericDwarfNode *GenericDwarfNode::getImpl(LLVMContext &Context, unsigned Tag,
unsigned Hash = 0;
if (Storage == Uniqued) {
- GenericDwarfNodeInfo::KeyTy Key(Tag, Header, DwarfOps);
- if (auto *N = getUniqued(Context.pImpl->GenericDwarfNodes, Key))
+ GenericDebugNodeInfo::KeyTy Key(Tag, Header, DwarfOps);
+ if (auto *N = getUniqued(Context.pImpl->GenericDebugNodes, Key))
return N;
if (!ShouldCreate)
return nullptr;
@@ -781,9 +781,9 @@ GenericDwarfNode *GenericDwarfNode::getImpl(LLVMContext &Context, unsigned Tag,
}
Metadata *PreOps[] = {Header};
- return storeImpl(new (DwarfOps.size() + 1) GenericDwarfNode(
+ return storeImpl(new (DwarfOps.size() + 1) GenericDebugNode(
Context, Storage, Hash, Tag, PreOps, DwarfOps),
- Storage, Context.pImpl->GenericDwarfNodes);
+ Storage, Context.pImpl->GenericDebugNodes);
}
void MDNode::deleteTemporary(MDNode *N) {
OpenPOWER on IntegriCloud