diff options
author | David Blaikie <dblaikie@gmail.com> | 2021-10-25 23:48:09 -0700 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2021-10-25 23:49:10 -0700 |
commit | a36032345ed823414fcee0f9aed43628f4320001 (patch) | |
tree | a3c6e9dd18fc938ee84a2674ce59d60276291a74 /cross-project-tests | |
parent | d4c74cd4e8f321a63154fb7fc442399b38a69935 (diff) | |
download | llvm-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.gdb | 5 |
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 |