[llvm] 6aac563 - [Demangle][Rust] Parse raw pointers
Tomasz Miąsko via llvm-commits
llvm-commits at lists.llvm.org
Sat May 22 02:51:40 PDT 2021
Author: Tomasz Miąsko
Date: 2021-05-22T11:49:08+02:00
New Revision: 6aac56336d49fe27c8b8d6c1554a73065a10453b
URL: https://github.com/llvm/llvm-project/commit/6aac56336d49fe27c8b8d6c1554a73065a10453b
DIFF: https://github.com/llvm/llvm-project/commit/6aac56336d49fe27c8b8d6c1554a73065a10453b.diff
LOG: [Demangle][Rust] Parse raw pointers
Reviewed By: dblaikie
Part of https://reviews.llvm.org/D102580
Added:
Modified:
llvm/lib/Demangle/RustDemangle.cpp
llvm/test/Demangle/rust.test
Removed:
################################################################################
diff --git a/llvm/lib/Demangle/RustDemangle.cpp b/llvm/lib/Demangle/RustDemangle.cpp
index 5430ce1c97efa..9a4180feb227f 100644
--- a/llvm/lib/Demangle/RustDemangle.cpp
+++ b/llvm/lib/Demangle/RustDemangle.cpp
@@ -454,6 +454,14 @@ void Demangler::demangleType() {
print(")");
break;
}
+ case 'P':
+ print("*const ");
+ demangleType();
+ break;
+ case 'O':
+ print("*mut ");
+ demangleType();
+ break;
default:
Position = Start;
demanglePath(rust_demangle::InType::Yes);
diff --git a/llvm/test/Demangle/rust.test b/llvm/test/Demangle/rust.test
index 9fe17154c4c9e..46eea4dfdc426 100644
--- a/llvm/test/Demangle/rust.test
+++ b/llvm/test/Demangle/rust.test
@@ -175,6 +175,12 @@ CHECK: types::<(_, _)>
CHECK: types::<(_, _, _)>
_RIC5typesTpppEE
+CHECK: types::<*const _>
+ _RIC5typesPpE
+
+CHECK: types::<*mut _>
+ _RIC5typesOpE
+
; Integer constants. Test value demangling.
CHECK: integer::<0>
More information about the llvm-commits
mailing list