[cfe-commits] r72432 - /cfe/trunk/lib/CodeGen/CGDebugInfo.cpp

Daniel Dunbar daniel at zuster.org
Tue May 26 12:40:21 PDT 2009


Author: ddunbar
Date: Tue May 26 14:40:20 2009
New Revision: 72432

URL: http://llvm.org/viewvc/llvm-project?rev=72432&view=rev
Log:
Use .data() instead of &...[0].
 - Just SmallVectors this time.

Modified:
    cfe/trunk/lib/CodeGen/CGDebugInfo.cpp

Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=72432&r1=72431&r2=72432&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Tue May 26 14:40:20 2009
@@ -253,7 +253,7 @@
   EltTys.push_back(FieldTy);
 
   FieldOffset += FieldSize;
-  Elements = DebugFactory.GetOrCreateArray(&EltTys[0], EltTys.size());
+  Elements = DebugFactory.GetOrCreateArray(EltTys.data(), EltTys.size());
   EltTys.clear();
 
   EltTy = DebugFactory.CreateCompositeType(Tag, Unit, "__block_descriptor",
@@ -324,7 +324,7 @@
   EltTys.push_back(FieldTy);
 
   FieldOffset += FieldSize;
-  Elements = DebugFactory.GetOrCreateArray(&EltTys[0], EltTys.size());
+  Elements = DebugFactory.GetOrCreateArray(EltTys.data(), EltTys.size());
 
   EltTy = DebugFactory.CreateCompositeType(Tag, Unit, "__block_literal_generic",
                                            DefUnit, 0, FieldOffset, 0, 0, 0,
@@ -375,7 +375,7 @@
   }
 
   llvm::DIArray EltTypeArray =
-    DebugFactory.GetOrCreateArray(&EltTys[0], EltTys.size());
+    DebugFactory.GetOrCreateArray(EltTys.data(), EltTys.size());
   
   return DebugFactory.CreateCompositeType(llvm::dwarf::DW_TAG_subroutine_type,
                                           Unit, "", llvm::DICompileUnit(),
@@ -485,7 +485,7 @@
   }
   
   llvm::DIArray Elements =
-    DebugFactory.GetOrCreateArray(&EltTys[0], EltTys.size());
+    DebugFactory.GetOrCreateArray(EltTys.data(), EltTys.size());
 
   // Bit size, align and offset of the type.
   uint64_t Size = M->getContext().getTypeSize(Ty);
@@ -714,7 +714,7 @@
   }
   
   llvm::DIArray SubscriptArray =
-    DebugFactory.GetOrCreateArray(&Subscripts[0], Subscripts.size());
+    DebugFactory.GetOrCreateArray(Subscripts.data(), Subscripts.size());
 
   return DebugFactory.CreateCompositeType(llvm::dwarf::DW_TAG_array_type,
                                           Unit, "", llvm::DICompileUnit(),





More information about the cfe-commits mailing list