Move a method from IdentifierTable.h out of line and remove the SmallString include.
Fix all the transitive include users.
llvm-svn: 149783
diff --git a/clang/lib/AST/DumpXML.cpp b/clang/lib/AST/DumpXML.cpp
index c5e23cc..3ce02b0 100644
--- a/clang/lib/AST/DumpXML.cpp
+++ b/clang/lib/AST/DumpXML.cpp
@@ -39,8 +39,7 @@
#include "clang/AST/TypeVisitor.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprCXX.h"
-#include "llvm/ADT/SmallVector.h"
-#include "llvm/ADT/StringRef.h"
+#include "llvm/ADT/SmallString.h"
using namespace clang;
diff --git a/clang/lib/AST/StmtPrinter.cpp b/clang/lib/AST/StmtPrinter.cpp
index 141cb29..df8ddb5 100644
--- a/clang/lib/AST/StmtPrinter.cpp
+++ b/clang/lib/AST/StmtPrinter.cpp
@@ -17,9 +17,9 @@
#include "clang/AST/DeclObjC.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/PrettyPrinter.h"
-#include "llvm/Support/Format.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprCXX.h"
+#include "llvm/ADT/SmallString.h"
using namespace clang;
//===----------------------------------------------------------------------===//
@@ -666,7 +666,8 @@
if (value < 256 && isprint(value)) {
OS << "'" << (char)value << "'";
} else if (value < 256) {
- OS << "'\\x" << llvm::format("%x", value) << "'";
+ OS << "'\\x";
+ OS.write_hex(value) << "'";
} else {
// FIXME what to really do here?
OS << value;
diff --git a/clang/lib/AST/TemplateBase.cpp b/clang/lib/AST/TemplateBase.cpp
index beb77d6..0eaf760 100644
--- a/clang/lib/AST/TemplateBase.cpp
+++ b/clang/lib/AST/TemplateBase.cpp
@@ -22,6 +22,7 @@
#include "clang/AST/TypeLoc.h"
#include "clang/Basic/Diagnostic.h"
#include "llvm/ADT/FoldingSet.h"
+#include "llvm/ADT/SmallString.h"
#include <algorithm>
#include <cctype>
@@ -40,10 +41,9 @@
if (T->isBooleanType()) {
Out << (Val->getBoolValue() ? "true" : "false");
} else if (T->isCharType()) {
- const unsigned char Ch = Val->getZExtValue();
- const std::string Str(1, Ch);
+ const char Ch = Val->getZExtValue();
Out << ((Ch == '\'') ? "'\\" : "'");
- Out.write_escaped(Str, /*UseHexEscapes=*/ true);
+ Out.write_escaped(StringRef(&Ch, 1), /*UseHexEscapes=*/ true);
Out << "'";
} else {
Out << Val->toString(10);