From 58bc4dd4a91443ddd3120b0a2f1801ad4d6aae1c Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 3 Apr 2010 22:12:35 +0000 Subject: add a twine form of MCStreamer::EmitRawText, and mc'ize a few more things in AsmPrinter.cpp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100294 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/MC/MCStreamer.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/MC/MCStreamer.cpp') diff --git a/lib/MC/MCStreamer.cpp b/lib/MC/MCStreamer.cpp index 0b88b0f..4f484a2 100644 --- a/lib/MC/MCStreamer.cpp +++ b/lib/MC/MCStreamer.cpp @@ -10,6 +10,8 @@ #include "llvm/MC/MCStreamer.h" #include "llvm/MC/MCExpr.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/ADT/SmallString.h" +#include "llvm/ADT/Twine.h" #include using namespace llvm; @@ -54,3 +56,9 @@ void MCStreamer::EmitRawText(StringRef String) { " something must not be fully mc'ized\n"; abort(); } + +void MCStreamer::EmitRawText(const Twine &T) { + SmallString<128> Str; + T.toVector(Str); + EmitRawText(Str.str()); +} -- cgit v1.1