summaryrefslogtreecommitdiff
path: root/utils/TableGen/AsmWriterEmitter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-09-27 16:44:09 +0000
committerChris Lattner <sabre@nondot.org>2006-09-27 16:44:09 +0000
commit259bda48e2c6b886f707513781f1b76595d4ad0d (patch)
tree99ab853f3517360c22d5da474da5f072e6fd70b0 /utils/TableGen/AsmWriterEmitter.cpp
parentc36f2a4ceadff85c83f9a2d68b187ec67d547b79 (diff)
downloadllvm-259bda48e2c6b886f707513781f1b76595d4ad0d.tar.gz
llvm-259bda48e2c6b886f707513781f1b76595d4ad0d.tar.bz2
llvm-259bda48e2c6b886f707513781f1b76595d4ad0d.tar.xz
This:
AggregateString += "\0\0"; Doesn't add two nuls to the AggregateString (for obvious reasons), which broke the asmprinter when the first character of an asm string was not literal text. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30625 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/AsmWriterEmitter.cpp')
-rw-r--r--utils/TableGen/AsmWriterEmitter.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/TableGen/AsmWriterEmitter.cpp b/utils/TableGen/AsmWriterEmitter.cpp
index 93ac6b9e14..b403c84a04 100644
--- a/utils/TableGen/AsmWriterEmitter.cpp
+++ b/utils/TableGen/AsmWriterEmitter.cpp
@@ -484,9 +484,10 @@ void AsmWriterEmitter::run(std::ostream &O) {
// Build an aggregate string, and build a table of offsets into it.
std::map<std::string, unsigned> StringOffset;
std::string AggregateString;
- AggregateString += "\0\0";
+ AggregateString.push_back(0); // "\0"
+ AggregateString.push_back(0); // "\0"
- /// OpcodeInfo - Theis encodes the index of the string to use for the first
+ /// OpcodeInfo - This encodes the index of the string to use for the first
/// chunk of the output as well as indices used for operand printing.
std::vector<unsigned> OpcodeInfo;