#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 {
class MDNode : public Constant, public FoldingSetNode {
MDNode(const MDNode &); // DO NOT IMPLEMENT
+ friend class LLVMContextImpl;
+
friend class ElementVH;
struct ElementVH : public CallbackVH {
MDNode *OwningNode;
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];
}
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: