[llvm] r286692 - One more set of changes to fix formatv() on linux.

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 11 16:35:58 PST 2016


Author: zturner
Date: Fri Nov 11 18:35:58 2016
New Revision: 286692

URL: http://llvm.org/viewvc/llvm-project?rev=286692&view=rev
Log:
One more set of changes to fix formatv() on linux.

Modified:
    llvm/trunk/include/llvm/Support/FormatVariadic.h
    llvm/trunk/include/llvm/Support/FormatVariadicDetails.h

Modified: llvm/trunk/include/llvm/Support/FormatVariadic.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/FormatVariadic.h?rev=286692&r1=286691&r2=286692&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/FormatVariadic.h (original)
+++ llvm/trunk/include/llvm/Support/FormatVariadic.h Fri Nov 11 18:35:58 2016
@@ -124,14 +124,14 @@ public:
     return Result;
   }
 
-  template <size_t N> llvm::SmallString<N> sstr() const {
+  template <unsigned N> llvm::SmallString<N> sstr() const {
     SmallString<N> Result;
     raw_svector_ostream Stream(Result);
     Stream << *this;
     return Result;
   }
 
-  template <size_t N> operator SmallString<N>() const { return sstr<N>(); }
+  template <unsigned N> operator SmallString<N>() const { return sstr<N>(); }
 
   operator std::string() const { return str(); }
 };

Modified: llvm/trunk/include/llvm/Support/FormatVariadicDetails.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/FormatVariadicDetails.h?rev=286692&r1=286691&r2=286692&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/FormatVariadicDetails.h (original)
+++ llvm/trunk/include/llvm/Support/FormatVariadicDetails.h Fri Nov 11 18:35:58 2016
@@ -22,7 +22,7 @@ namespace detail {
 
 class format_wrapper {
 protected:
-  ~format_wrapper() {}
+  virtual ~format_wrapper() {}
 
 public:
   virtual void format(llvm::raw_ostream &S, StringRef Options) = 0;




More information about the llvm-commits mailing list