diff options
author | David Blaikie <dblaikie@gmail.com> | 2021-11-04 20:45:29 -0700 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2021-11-04 22:50:50 -0700 |
commit | def232915f81ce391ef54b8a7af85c6729a6d359 (patch) | |
tree | 20339b28931ef6e65bd04feff7b41cb331b52fbf /cross-project-tests | |
parent | 1606022fab2d90ed8ee6d15800ec1c2c293db20e (diff) | |
download | llvm-def232915f81ce391ef54b8a7af85c6729a6d359.tar.gz |
Fix some issues with the gdb pretty printers for llvm::Twine
Still some pending bugs, but at least ironed some things out.
Diffstat (limited to 'cross-project-tests')
-rw-r--r-- | cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/llvm-support.cpp | 7 | ||||
-rw-r--r-- | cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/llvm-support.gdb | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/llvm-support.cpp b/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/llvm-support.cpp index 867962876916..61ef52e079b8 100644 --- a/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/llvm-support.cpp +++ b/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/llvm-support.cpp @@ -24,7 +24,12 @@ llvm::Optional<int> OptionalNone(llvm::None); llvm::SmallVector<int, 5> SmallVector = {10, 11, 12}; llvm::SmallString<5> SmallString("foo"); llvm::StringRef StringRef = "bar"; -llvm::Twine Twine = llvm::Twine(SmallString) + StringRef; +// Should test std::string in Twine too, but it's currently broken because I +// don't know how to add 'str' and 'gdb.LazyString' (can't figure out any way to +// string-ify LazyString). +//std::string String = "foo"; +llvm::Twine TempTwine = llvm::Twine(3) + StringRef; +llvm::Twine Twine = TempTwine + "baz"; llvm::PointerIntPair<int *, 1> PointerIntPair(IntPtr, 1); struct alignas(8) Z {}; 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 c6b334ffa9a8..b5f625d4702b 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,7 +37,7 @@ p SmallString # CHECK: "bar" p StringRef -# CHECK: "foobar" +# CHECK: "3barbaz" p Twine # CHECK: llvm::StringMap with 2 elements = {["foo"] = 123, ["bar"] = 456} |