projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[AVX] Unique BitInit
[oota-llvm.git]
/
utils
/
TableGen
/
StringToOffsetTable.h
diff --git
a/utils/TableGen/StringToOffsetTable.h
b/utils/TableGen/StringToOffsetTable.h
index d9d7cf485efd09370231ae63423c798f491f68f1..ac9422c5d72daa0a1bf6f86b261a1e87df6f5894 100644
(file)
--- a/
utils/TableGen/StringToOffsetTable.h
+++ b/
utils/TableGen/StringToOffsetTable.h
@@
-10,9
+10,10
@@
#ifndef TBLGEN_STRING_TO_OFFSET_TABLE_H
#define TBLGEN_STRING_TO_OFFSET_TABLE_H
#ifndef TBLGEN_STRING_TO_OFFSET_TABLE_H
#define TBLGEN_STRING_TO_OFFSET_TABLE_H
+#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringMap.h"
-#include "llvm/Support/raw_ostream.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringExtras.h"
+#include "llvm/Support/raw_ostream.h"
namespace llvm {
namespace llvm {
@@
-38,9
+39,13
@@
public:
}
void EmitString(raw_ostream &O) {
}
void EmitString(raw_ostream &O) {
+ // Escape the string.
+ SmallString<256> Str;
+ raw_svector_ostream(Str).write_escaped(AggregateString);
+ AggregateString = Str.str();
+
O << " \"";
unsigned CharsPrinted = 0;
O << " \"";
unsigned CharsPrinted = 0;
- EscapeString(AggregateString);
for (unsigned i = 0, e = AggregateString.size(); i != e; ++i) {
if (CharsPrinted > 70) {
O << "\"\n \"";
for (unsigned i = 0, e = AggregateString.size(); i != e; ++i) {
if (CharsPrinted > 70) {
O << "\"\n \"";