about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorArlie Davis <ardavis@microsoft.com>2020-12-22 14:02:07 -0800
committerArlie Davis <ardavis@microsoft.com>2020-12-28 12:14:49 -0800
commit2f584229d4e9dab4f1eb4cb548756b708619ae15 (patch)
tree512994b990243058f2c3f034a2e0a5ef8a4de6a0 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent2987785df3d46d5ff144a5c67fbb8f5cca798d78 (diff)
downloadrust-2f584229d4e9dab4f1eb4cb548756b708619ae15.tar.gz
rust-2f584229d4e9dab4f1eb4cb548756b708619ae15.zip
Improvements to NatVis support
NatVis files describe how to display types in some Windows debuggers,
such as Visual Studio, WinDbg, and VS Code.

This commit makes several improvements:

* Adds visualizers for Rc<T>, Weak<T>, and Arc<T>.

* Changes [size] to [len], for consistency with the Rust API.
  Visualizers often use [size] to mirror the size() method on C++ STL
  collections.

* Several visualizers used the PVOID and ULONG typedefs. These are part
  of the Windows API; they are not guaranteed to always be defined in a
  pure Rust DLL/EXE. I converted PVOID to `void*` and `ULONG` to
  `unsigned long`.

* Cosmetic change: Removed {} braces around the visualized display
  for `Option` types. They now display simply as `Some(value)` or
  `None`, which reflects what is written in source code.

* The visualizer for `alloc::string::String` makes assumptions about
  the layout of `String` (it casts `String*` to another type), rather
  than using symbolic expressions. This commit changes the visualizer
  so that it simply uses symbolic expressions to access the string
  data and string length.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions