#include "llvm/User.h"
#include "llvm/Type.h"
#include "llvm/OperandTraits.h"
-#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/ilist_node.h"
#include "llvm/Support/ErrorHandling.h"
/// MDNode - a tuple of other values.
/// These contain a list of the values that represent the metadata.
/// MDNode is always unnamed.
-class MDNode : public MetadataBase, public FoldingSetNode {
+class MDNode : public MetadataBase {
MDNode(const MDNode &); // DO NOT IMPLEMENT
void *operator new(size_t, unsigned); // DO NOT IMPLEMENT
// getNumOperands - Make this only available for private uses.
return false;
}
- /// Profile - calculate a unique identifier for this MDNode to collapse
- /// duplicates
- void Profile(FoldingSetNodeID &ID) const;
-
virtual void replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U) {
llvm_unreachable("This should never be called because MDNodes have no ops");
}
return false;
}
- /// Profile - calculate a unique identifier for this MDNode to collapse
- /// duplicates
- void Profile(FoldingSetNodeID &ID) const;
-
virtual void replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U) {
llvm_unreachable(
"This should never be called because NamedMDNodes have no ops");
}
}
-void MDNode::Profile(FoldingSetNodeID &ID) const {
- for (const_elem_iterator I = elem_begin(), E = elem_end(); I != E; ++I)
- ID.AddPointer(*I);
-}
-
MDNode *MDNode::get(LLVMContext &Context, Value*const* Vals, unsigned NumVals) {
LLVMContextImpl *pImpl = Context.pImpl;
std::vector<Value*> V;