make double-dollar properly escape asmstrings

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19740 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Andrew Lenharth
2005-01-22 00:35:22 +00:00
parent 7cd50cf286
commit 2202bfa5a3

View File

@@ -103,6 +103,7 @@ void AsmWriterEmitter::run(std::ostream &O) {
} else if (DollarPos+1 != AsmString.size() && } else if (DollarPos+1 != AsmString.size() &&
AsmString[DollarPos+1] == '$') { AsmString[DollarPos+1] == '$') {
O << " << '$'"; // "$$" -> $ O << " << '$'"; // "$$" -> $
LastEmitted = DollarPos+2;
} else { } else {
// Get the name of the variable. // Get the name of the variable.
// TODO: should eventually handle ${foo}bar as $foo // TODO: should eventually handle ${foo}bar as $foo