summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Constants.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2009-05-30 05:06:04 +0000
committerNick Lewycky <nicholas@mxc.ca>2009-05-30 05:06:04 +0000
commitadbc2846667507bdb0b06707b04539aacf4bc6f5 (patch)
treee3dcbbaf39e5a96c0c13e7f93bc176521ef4e6d0 /llvm/lib/VMCore/Constants.cpp
parentef334fdfa2a461491301d23ad5f17942ec845d92 (diff)
downloadbcm5719-llvm-adbc2846667507bdb0b06707b04539aacf4bc6f5.tar.gz
bcm5719-llvm-adbc2846667507bdb0b06707b04539aacf4bc6f5.zip
Give embedded metadata its own type instead of relying on EmptyStructTy.
llvm-svn: 72610
Diffstat (limited to 'llvm/lib/VMCore/Constants.cpp')
-rw-r--r--llvm/lib/VMCore/Constants.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/Constants.cpp b/llvm/lib/VMCore/Constants.cpp
index d3f9b7f45b7..97f3ac9c270 100644
--- a/llvm/lib/VMCore/Constants.cpp
+++ b/llvm/lib/VMCore/Constants.cpp
@@ -1664,7 +1664,7 @@ void UndefValue::destroyConstant() {
//
MDString::MDString(const char *begin, const char *end)
- : Constant(Type::EmptyStructTy, MDStringVal, 0, 0),
+ : Constant(Type::MetadataTy, MDStringVal, 0, 0),
StrBegin(begin), StrEnd(end) {}
static ManagedStatic<StringMap<MDString*> > MDStringCache;
@@ -1689,7 +1689,7 @@ void MDString::destroyConstant() {
static ManagedStatic<FoldingSet<MDNode> > MDNodeSet;
MDNode::MDNode(Value*const* Vals, unsigned NumVals)
- : Constant(Type::EmptyStructTy, MDNodeVal, 0, 0) {
+ : Constant(Type::MetadataTy, MDNodeVal, 0, 0) {
for (unsigned i = 0; i != NumVals; ++i)
Node.push_back(ElementVH(Vals[i], this));
}
OpenPOWER on IntegriCloud