summaryrefslogtreecommitdiff
path: root/lib/MC/MCStreamer.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-04-03 22:12:35 +0000
committerChris Lattner <sabre@nondot.org>2010-04-03 22:12:35 +0000
commit58bc4dd4a91443ddd3120b0a2f1801ad4d6aae1c (patch)
tree700565cb493914bcd214dbe70ad1eb759736a813 /lib/MC/MCStreamer.cpp
parentd5928dcd78ec03a64f61b7a93be219d97eda1f5c (diff)
downloadllvm-58bc4dd4a91443ddd3120b0a2f1801ad4d6aae1c.tar.gz
llvm-58bc4dd4a91443ddd3120b0a2f1801ad4d6aae1c.tar.bz2
llvm-58bc4dd4a91443ddd3120b0a2f1801ad4d6aae1c.tar.xz
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
Diffstat (limited to 'lib/MC/MCStreamer.cpp')
-rw-r--r--lib/MC/MCStreamer.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/MC/MCStreamer.cpp b/lib/MC/MCStreamer.cpp
index 0b88b0fe8b..4f484a27d3 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 <cstdlib>
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());
+}