Use a better name for the label relocations while emitting them for Jump Tables
[oota-llvm.git] / include / llvm / MDNode.h
index d632e4ea4a6fb9037418c9961879e1dfcba7d64d..e3944365ee465e8e568c756d120f4042c808a72c 100644 (file)
@@ -25,6 +25,7 @@
 #include "llvm/Type.h"
 #include "llvm/ADT/FoldingSet.h"
 #include "llvm/ADT/SmallVector.h"
+#include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/ValueHandle.h"
 
 namespace llvm {
@@ -45,6 +46,8 @@ namespace llvm {
 class MDNode : public Constant, public FoldingSetNode {
   MDNode(const MDNode &);      // DO NOT IMPLEMENT
 
+  friend class LLVMContextImpl;
+
   friend class ElementVH;
   struct ElementVH : public CallbackVH {
     MDNode *OwningNode;
@@ -71,15 +74,12 @@ class MDNode : public Constant, public FoldingSetNode {
 
   SmallVector<ElementVH, 4> Node;
   typedef SmallVectorImpl<ElementVH>::iterator elem_iterator;
+
 protected:
   explicit MDNode(Value*const* Vals, unsigned NumVals);
 public:
   typedef SmallVectorImpl<ElementVH>::const_iterator const_elem_iterator;
 
-  /// get() - Static factory methods - Return objects of the specified value.
-  ///
-  static MDNode *get(Value*const* Vals, unsigned NumVals);
-
   Value *getElement(unsigned i) const {
     return Node[i];
   }
@@ -119,8 +119,7 @@ public:
 
   virtual void destroyConstant();
   virtual void replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U) {
-    assert(0 && "This should never be called because MDNodes have no ops");
-    abort();
+    llvm_unreachable("This should never be called because MDNodes have no ops");
   }
 
   /// Methods for support type inquiry through isa, cast, and dyn_cast: