g++ 4.0 doesn't have std::vector::data.
authorBenjamin Kramer <benny.kra@googlemail.com>
Mon, 10 Aug 2009 18:27:33 +0000 (18:27 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Mon, 10 Aug 2009 18:27:33 +0000 (18:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78579 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/ConstantsContext.h

index fc2d5af991c2662eb056fc768ecebea26ce3ed21..4b08e04dafdeb09180dc57fce04114a5903d7a83 100644 (file)
@@ -446,7 +446,7 @@ struct ConstantCreator<ConstantAggregateZero, Type, ValType> {
 template<>
 struct ConstantCreator<MDNode, Type, std::vector<Value*> > {
   static MDNode *create(const Type* Ty, const std::vector<Value*> &V) {
-    return new MDNode(V.data(), V.size());
+    return new MDNode(&V[0], V.size());
   }
 };