]> granicus.if.org Git - clang/commitdiff
Fix incorrect format string in debug output.
authorEli Friedman <eli.friedman@gmail.com>
Sat, 5 Nov 2011 00:38:30 +0000 (00:38 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Sat, 5 Nov 2011 00:38:30 +0000 (00:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143768 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/RecordLayoutBuilder.cpp

index e8820d002c8d7a89b8151ee7eda920bfb6dd8ba6..a32b20869dc987624dc5c2d8d18183ed204df48a 100644 (file)
@@ -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 @@ ASTContext::getObjCLayout(const ObjCInterfaceDecl *D,
 
 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);
 }