[cfe-commits] r62340 - /cfe/trunk/lib/Analysis/MemRegion.cpp
Ted Kremenek
kremenek at apple.com
Fri Jan 16 11:26:51 PST 2009
Author: kremenek
Date: Fri Jan 16 13:26:50 2009
New Revision: 62340
URL: http://llvm.org/viewvc/llvm-project?rev=62340&view=rev
Log:
StringRegion::print: Remove copy/paste code and just call Stmt::printPretty() for the StringLiteral.
Modified:
cfe/trunk/lib/Analysis/MemRegion.cpp
Modified: cfe/trunk/lib/Analysis/MemRegion.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/MemRegion.cpp?rev=62340&r1=62339&r2=62340&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/MemRegion.cpp (original)
+++ cfe/trunk/lib/Analysis/MemRegion.cpp Fri Jan 16 13:26:50 2009
@@ -179,23 +179,7 @@
}
void StringRegion::print(llvm::raw_ostream& os) const {
- if (Str->isWide()) os << 'L';
- os << '"';
-
- // FIXME: this doesn't print wstrings right.
- for (unsigned i = 0, e = Str->getByteLength(); i != e; ++i) {
- switch (Str->getStrData()[i]) {
- default: os << Str->getStrData()[i]; break;
- // Handle some common ones to make dumps prettier.
- case '\\': os << "\\\\"; break;
- case '"': os << "\\\""; break;
- case '\n': os << "\\n"; break;
- case '\t': os << "\\t"; break;
- case '\a': os << "\\a"; break;
- case '\b': os << "\\b"; break;
- }
- }
- os << '"';
+ Str->printPretty(os);
}
//===----------------------------------------------------------------------===//
More information about the cfe-commits
mailing list