[llvm-commits] [llvm] r67558 - in /llvm/tags/Apple/llvmCore-2104.1/utils/TableGen: AsmWriterEmitter.cpp TGLexer.cpp
Bill Wendling
isanbard at gmail.com
Mon Mar 23 13:33:05 PDT 2009
Author: void
Date: Mon Mar 23 15:33:03 2009
New Revision: 67558
URL: http://llvm.org/viewvc/llvm-project?rev=67558&view=rev
Log:
--- Reverse-merging r66958 into '.':
U utils/TableGen/AsmWriterEmitter.cpp
U utils/TableGen/TGLexer.cpp
Revert r66958.
Modified:
llvm/tags/Apple/llvmCore-2104.1/utils/TableGen/AsmWriterEmitter.cpp
llvm/tags/Apple/llvmCore-2104.1/utils/TableGen/TGLexer.cpp
Modified: llvm/tags/Apple/llvmCore-2104.1/utils/TableGen/AsmWriterEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/tags/Apple/llvmCore-2104.1/utils/TableGen/AsmWriterEmitter.cpp?rev=67558&r1=67557&r2=67558&view=diff
==============================================================================
--- llvm/tags/Apple/llvmCore-2104.1/utils/TableGen/AsmWriterEmitter.cpp (original)
+++ llvm/tags/Apple/llvmCore-2104.1/utils/TableGen/AsmWriterEmitter.cpp Mon Mar 23 15:33:03 2009
@@ -130,20 +130,11 @@
// Emit a constant string fragment.
if (DollarPos != LastEmitted) {
- if (CurVariant == Variant || CurVariant == ~0U) {
- for (; LastEmitted != DollarPos; ++LastEmitted)
- switch (AsmString[LastEmitted]) {
- case '\n': AddLiteralString("\\n"); break;
- case '\t': AddLiteralString("\\t"); break;
- case '"': AddLiteralString("\\\""); break;
- case '\\': AddLiteralString("\\\\"); break;
- default:
- AddLiteralString(std::string(1, AsmString[LastEmitted]));
- break;
- }
- } else {
- LastEmitted = DollarPos;
- }
+ // TODO: this should eventually handle escaping.
+ if (CurVariant == Variant || CurVariant == ~0U)
+ AddLiteralString(std::string(AsmString.begin()+LastEmitted,
+ AsmString.begin()+DollarPos));
+ LastEmitted = DollarPos;
} else if (AsmString[DollarPos] == '\\') {
if (DollarPos+1 != AsmString.size() &&
(CurVariant == Variant || CurVariant == ~0U)) {
Modified: llvm/tags/Apple/llvmCore-2104.1/utils/TableGen/TGLexer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/tags/Apple/llvmCore-2104.1/utils/TableGen/TGLexer.cpp?rev=67558&r1=67557&r2=67558&view=diff
==============================================================================
--- llvm/tags/Apple/llvmCore-2104.1/utils/TableGen/TGLexer.cpp (original)
+++ llvm/tags/Apple/llvmCore-2104.1/utils/TableGen/TGLexer.cpp Mon Mar 23 15:33:03 2009
@@ -174,11 +174,11 @@
CurStrVal += *CurPtr++;
break;
case 't':
- CurStrVal += '\t';
+ CurStrVal += "\\t";
++CurPtr;
break;
case 'n':
- CurStrVal += '\n';
+ CurStrVal += "\\n";
++CurPtr;
break;
More information about the llvm-commits
mailing list