[cfe-commits] r143768 - /cfe/trunk/lib/AST/RecordLayoutBuilder.cpp

Eli Friedman eli.friedman at gmail.com
Fri Nov 4 17:38:30 PDT 2011


Author: efriedma
Date: Fri Nov  4 19:38:30 2011
New Revision: 143768

URL: http://llvm.org/viewvc/llvm-project?rev=143768&view=rev
Log:
Fix incorrect format string in debug output.


Modified:
    cfe/trunk/lib/AST/RecordLayoutBuilder.cpp

Modified: cfe/trunk/lib/AST/RecordLayoutBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/RecordLayoutBuilder.cpp?rev=143768&r1=143767&r2=143768&view=diff
==============================================================================
--- cfe/trunk/lib/AST/RecordLayoutBuilder.cpp (original)
+++ cfe/trunk/lib/AST/RecordLayoutBuilder.cpp Fri Nov  4 19:38:30 2011
@@ -18,6 +18,7 @@
 #include "clang/Sema/SemaDiagnostic.h"
 #include "llvm/Support/Format.h"
 #include "llvm/ADT/SmallSet.h"
+#include "llvm/ADT/StringExtras.h"
 #include "llvm/Support/MathExtras.h"
 #include "llvm/Support/CrashRecoveryContext.h"
 
@@ -2161,7 +2162,7 @@
 
 static void PrintOffset(raw_ostream &OS,
                         CharUnits Offset, unsigned IndentLevel) {
-  OS << llvm::format("%4d | ", Offset.getQuantity());
+  OS << llvm::format("%4s | ", llvm::itostr(Offset.getQuantity()).c_str());
   OS.indent(IndentLevel * 2);
 }
 





More information about the cfe-commits mailing list