diff --git a/docs/LangRef.html b/docs/LangRef.html
index 4c635d3a5aa..42ae0ae4b14 100644
--- a/docs/LangRef.html
+++ b/docs/LangRef.html
@@ -949,15 +949,17 @@ define [linkage] [visibility]
Named metadata is a collection of metadata. Metadata
- nodes (but not metadata strings) and null are the only valid operands for
+ nodes (but not metadata strings) are the only valid operands for
a named metadata.
Syntax:
-; An unnamed metadata node, which is referenced by the named metadata.
+; Some unnamed metadata nodes, which are referenced by the named metadata.
+!0 = metadata !{metadata !"zero"}
!1 = metadata !{metadata !"one"}
+!2 = metadata !{metadata !"two"}
; A named metadata.
-!name = !{null, !1}
+!name = !{!0, !1, !2}
diff --git a/include/llvm/Analysis/DebugInfo.h b/include/llvm/Analysis/DebugInfo.h
index 2b16abf0c77..f6e78320b3e 100644
--- a/include/llvm/Analysis/DebugInfo.h
+++ b/include/llvm/Analysis/DebugInfo.h
@@ -304,8 +304,7 @@ namespace llvm {
void dump() const;
/// replaceAllUsesWith - Replace all uses of debug info referenced by
- /// this descriptor. After this completes, the current debug info value
- /// is erased.
+ /// this descriptor.
void replaceAllUsesWith(DIDescriptor &D);
};
diff --git a/include/llvm/Metadata.h b/include/llvm/Metadata.h
index 7cfcb700795..1869890722a 100644
--- a/include/llvm/Metadata.h
+++ b/include/llvm/Metadata.h
@@ -149,9 +149,6 @@ public:
// critical code because it recursively visits all the MDNode's operands.
const Function *getFunction() const;
- // destroy - Delete this node. Only when there are no uses.
- void destroy();
-
/// Profile - calculate a unique identifier for this MDNode to collapse
/// duplicates
void Profile(FoldingSetNodeID &ID) const;
@@ -162,6 +159,9 @@ public:
return V->getValueID() == MDNodeVal;
}
private:
+ // destroy - Delete this node. Only when there are no uses.
+ void destroy();
+
bool isNotUniqued() const {
return (getSubclassDataFromValue() & NotUniquedBit) != 0;
}
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp
index ca6c2e6d721..277edefe7b7 100644
--- a/lib/Analysis/DebugInfo.cpp
+++ b/lib/Analysis/DebugInfo.cpp
@@ -233,8 +233,7 @@ unsigned DIArray::getNumElements() const {
}
/// replaceAllUsesWith - Replace all uses of debug info referenced by
-/// this descriptor. After this completes, the current debug info value
-/// is erased.
+/// this descriptor.
void DIDerivedType::replaceAllUsesWith(DIDescriptor &D) {
if (!DbgNode)
return;
@@ -249,7 +248,6 @@ void DIDerivedType::replaceAllUsesWith(DIDescriptor &D) {
const MDNode *DN = D;
const Value *V = cast_or_null