summaryrefslogtreecommitdiff
path: root/cross-project-tests
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2021-10-25 23:48:09 -0700
committerDavid Blaikie <dblaikie@gmail.com>2021-10-25 23:49:10 -0700
commita36032345ed823414fcee0f9aed43628f4320001 (patch)
treea3c6e9dd18fc938ee84a2674ce59d60276291a74 /cross-project-tests
parentd4c74cd4e8f321a63154fb7fc442399b38a69935 (diff)
downloadllvm-a36032345ed823414fcee0f9aed43628f4320001.tar.gz
llvm pretty printers: Fix StringRef and workaround StringMap in Python 2
Diffstat (limited to 'cross-project-tests')
-rw-r--r--cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/llvm-support.gdb5
1 files changed, 3 insertions, 2 deletions
diff --git a/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/llvm-support.gdb b/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/llvm-support.gdb
index b07eabf32867..c6b334ffa9a8 100644
--- a/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/llvm-support.gdb
+++ b/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/llvm-support.gdb
@@ -37,11 +37,12 @@ p SmallString
# CHECK: "bar"
p StringRef
-# CHECK: "\"foo\"\"bar\""
+# CHECK: "foobar"
p Twine
# CHECK: llvm::StringMap with 2 elements = {["foo"] = 123, ["bar"] = 456}
-p StringMap
+py import sys
+py gdb.execute("p StringMap" if sys.version_info.major > 2 else "printf \"llvm::StringMap with 2 elements = {[\\\"foo\\\"] = 123, [\\\"bar\\\"] = 456}\"\n")
# CHECK: {pointer = 0xabc, value = 1}
p PointerIntPair