summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Constants.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-07-28 21:49:47 +0000
committerDevang Patel <dpatel@apple.com>2009-07-28 21:49:47 +0000
commita4f43fb5dd91285cc1f77383d7426226f4cbe10e (patch)
treeae5b2175fa1833e5301f50b92da1b96218b7c8e3 /llvm/lib/VMCore/Constants.cpp
parent4a040410564739c903225c6709d95de4a138c231 (diff)
downloadbcm5719-llvm-a4f43fb5dd91285cc1f77383d7426226f4cbe10e.tar.gz
bcm5719-llvm-a4f43fb5dd91285cc1f77383d7426226f4cbe10e.zip
Rename MDNode.h header. It defines MDnode and other metadata classes.
New name is Metadata.h. llvm-svn: 77370
Diffstat (limited to 'llvm/lib/VMCore/Constants.cpp')
-rw-r--r--llvm/lib/VMCore/Constants.cpp30
1 files changed, 0 insertions, 30 deletions
diff --git a/llvm/lib/VMCore/Constants.cpp b/llvm/lib/VMCore/Constants.cpp
index 31a82e59f2f..92b76b9b345 100644
--- a/llvm/lib/VMCore/Constants.cpp
+++ b/llvm/lib/VMCore/Constants.cpp
@@ -17,7 +17,6 @@
#include "llvm/DerivedTypes.h"
#include "llvm/GlobalValue.h"
#include "llvm/Instructions.h"
-#include "llvm/MDNode.h"
#include "llvm/Module.h"
#include "llvm/Operator.h"
#include "llvm/ADT/FoldingSet.h"
@@ -1225,20 +1224,6 @@ void UndefValue::destroyConstant() {
destroyConstantImpl();
}
-//---- MDNode::get() implementation
-//
-
-MDNode::MDNode(Value*const* Vals, unsigned NumVals)
- : MetadataBase(Type::MetadataTy, Value::MDNodeVal) {
- for (unsigned i = 0; i != NumVals; ++i)
- Node.push_back(WeakVH(Vals[i]));
-}
-
-void MDNode::Profile(FoldingSetNodeID &ID) const {
- for (const_elem_iterator I = elem_begin(), E = elem_end(); I != E; ++I)
- ID.AddPointer(*I);
-}
-
//---- ConstantExpr::get() implementations...
//
@@ -2296,18 +2281,3 @@ void ConstantExpr::replaceUsesOfWithOnConstant(Value *From, Value *ToV,
destroyConstant();
}
-void MDNode::replaceElement(Value *From, Value *To) {
- SmallVector<Value*, 4> Values;
- Values.reserve(getNumElements()); // Build replacement array...
- for (unsigned i = 0, e = getNumElements(); i != e; ++i) {
- Value *Val = getElement(i);
- if (Val == From) Val = To;
- Values.push_back(Val);
- }
-
- MDNode *Replacement =
- getType()->getContext().getMDNode(&Values[0], Values.size());
- assert(Replacement != this && "I didn't contain From!");
-
- uncheckedReplaceAllUsesWith(Replacement);
-}
OpenPOWER on IntegriCloud