[PATCH] D103460: [Demangle][Rust] Parse instantiating crate

Tomasz Miąsko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 7 10:17:44 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG43929ccc1296: [Demangle][Rust] Parse instantiating crate (authored by tmiasko).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103460/new/

https://reviews.llvm.org/D103460

Files:
  llvm/lib/Demangle/RustDemangle.cpp
  llvm/test/Demangle/rust.test


Index: llvm/test/Demangle/rust.test
===================================================================
--- llvm/test/Demangle/rust.test
+++ llvm/test/Demangle/rust.test
@@ -9,6 +9,11 @@
 CHECK: a::b::c
        _RNvNvC1a1b1c
 
+; Instantiating crate
+
+CHECK: crate
+       _RC5crateC3foo
+
 ; Closure namespace
 
 CHECK: crate::{closure#0}
Index: llvm/lib/Demangle/RustDemangle.cpp
===================================================================
--- llvm/lib/Demangle/RustDemangle.cpp
+++ llvm/lib/Demangle/RustDemangle.cpp
@@ -113,7 +113,10 @@
 
   demanglePath(rust_demangle::InType::No);
 
-  // FIXME parse optional <instantiating-crate>.
+  if (Position != Input.size()) {
+    SwapAndRestore<bool> SavePrint(Print, false);
+    demanglePath(InType::No);
+  }
 
   if (Position != Input.size())
     Error = true;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103460.350349.patch
Type: text/x-patch
Size: 824 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210607/9f5deb10/attachment.bin>


More information about the llvm-commits mailing list