about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2020-12-30 22:49:19 +0900
committerGitHub <noreply@github.com>2020-12-30 22:49:19 +0900
commit88b198b727d79c04d35c43feaabaa9e3d1a94f0c (patch)
treefe643f22d573e3b52c42ca24c12f4535a5108fe9 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent00741b88101c4ec78c34bf2fa1cd275d1a35afc2 (diff)
parent2f584229d4e9dab4f1eb4cb548756b708619ae15 (diff)
downloadrust-88b198b727d79c04d35c43feaabaa9e3d1a94f0c.tar.gz
rust-88b198b727d79c04d35c43feaabaa9e3d1a94f0c.zip
Rollup merge of #80311 - sivadeilra:natvis, r=petrochenkov
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.

* The visualizers for `str` and `String` now place the character data
  array under a synthetic `[chars]` node. When expanding a `String`
  node, users rarely want to see an array of characters. This just places
  them behind one expansion node / level.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions