[llvm] r267299 - BitcodeReader: Avoid std::vector with non-movable types from r267296

Duncan P. N. Exon Smith via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 23 14:36:59 PDT 2016


Author: dexonsmith
Date: Sat Apr 23 16:36:59 2016
New Revision: 267299

URL: http://llvm.org/viewvc/llvm-project?rev=267299&view=rev
Log:
BitcodeReader: Avoid std::vector with non-movable types from r267296

r267298 didn't quite fix the build errors.  Use SmallVector instead of
std::vector, the latter of which I think is trying to maintain a strong
exception safety guarantee.

http://lab.llvm.org:8011/builders/lldb-amd64-ninja-freebsd11/builds/6228

Modified:
    llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp

Modified: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp?rev=267299&r1=267298&r2=267299&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp (original)
+++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp Sat Apr 23 16:36:59 2016
@@ -119,7 +119,7 @@ class BitcodeReaderMetadataList {
     SmallDenseMap<MDString *, TempMDTuple, 1> Unknown;
     SmallDenseMap<MDString *, DICompositeType *, 1> Final;
     SmallDenseMap<MDString *, DICompositeType *, 1> FwdDecls;
-    std::vector<std::pair<TrackingMDRef, TempMDTuple>> Arrays;
+    SmallVector<std::pair<TrackingMDRef, TempMDTuple>, 1> Arrays;
   } OldTypeRefs;
 
   LLVMContext &Context;




More information about the llvm-commits mailing list