diff options
author | Reid Kleckner <rnk@google.com> | 2019-10-10 18:31:57 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2019-10-10 18:31:57 +0000 |
commit | 67d440b949d6fefef53deec1e585435ffb33f4f8 (patch) | |
tree | 0df3c5909e591b098da10cfe59dc1fb0953efa02 /llvm/unittests/ADT/StringExtrasTest.cpp | |
parent | e9529a942a76a9247fb94613c7d5ae482fe22adf (diff) | |
download | bcm5719-llvm-67d440b949d6fefef53deec1e585435ffb33f4f8.tar.gz bcm5719-llvm-67d440b949d6fefef53deec1e585435ffb33f4f8.zip |
Print quoted backslashes in LLVM IR as \\ instead of \5C
This improves readability of Windows path string literals in LLVM IR.
The LLVM assembler has supported \\ in IR strings for a long time, but
the lexer doesn't tolerate escaped quotes, so they have to be printed as
\22 for now.
llvm-svn: 374415
Diffstat (limited to 'llvm/unittests/ADT/StringExtrasTest.cpp')
-rw-r--r-- | llvm/unittests/ADT/StringExtrasTest.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/unittests/ADT/StringExtrasTest.cpp b/llvm/unittests/ADT/StringExtrasTest.cpp index 97c91de1d3f..921fc7d349a 100644 --- a/llvm/unittests/ADT/StringExtrasTest.cpp +++ b/llvm/unittests/ADT/StringExtrasTest.cpp @@ -109,7 +109,7 @@ TEST(StringExtrasTest, printEscapedString) { std::string str; raw_string_ostream OS(str); printEscapedString("ABCdef123&<>\\\"'\t", OS); - EXPECT_EQ("ABCdef123&<>\\5C\\22'\\09", OS.str()); + EXPECT_EQ("ABCdef123&<>\\\\\\22'\\09", OS.str()); } TEST(StringExtrasTest, printHTMLEscaped) { |