From 8a5d0aedc16ab1a5beff6bbc1b470f47d2c28b67 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Sat, 5 Nov 2011 00:38:30 +0000 Subject: [PATCH] Fix incorrect format string in debug output. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143768 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AST/RecordLayoutBuilder.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/AST/RecordLayoutBuilder.cpp b/lib/AST/RecordLayoutBuilder.cpp index e8820d002c..a32b20869d 100644 --- a/lib/AST/RecordLayoutBuilder.cpp +++ b/lib/AST/RecordLayoutBuilder.cpp @@ -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); } -- 2.40.0