summaryrefslogtreecommitdiff
path: root/src/utils.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.cc')
-rw-r--r--src/utils.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/utils.cc b/src/utils.cc
index 3922033dd7..a74e2310a7 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -110,13 +110,19 @@ std::string PrettyDescriptor(const std::string& descriptor) {
return result;
}
+std::string PrettyDescriptor(Primitive::Type type) {
+ char descriptor_char = Primitive::DescriptorChar(type);
+ std::string descriptor_string(1, descriptor_char);
+ return PrettyDescriptor(descriptor_string);
+}
+
std::string PrettyField(const Field* f, bool with_type) {
if (f == NULL) {
return "null";
}
std::string result;
if (with_type) {
- result += PrettyDescriptor(f->GetType()->GetDescriptor());
+ result += PrettyDescriptor(f->GetTypeDescriptor());
result += ' ';
}
result += PrettyDescriptor(f->GetDeclaringClass()->GetDescriptor());