[llvm] r287469 - Demangle: use direct member initialization (NFC)
Saleem Abdulrasool via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 19 16:20:21 PST 2016
Author: compnerd
Date: Sat Nov 19 18:20:20 2016
New Revision: 287469
URL: http://llvm.org/viewvc/llvm-project?rev=287469&view=rev
Log:
Demangle: use direct member initialization (NFC)
Prefer direct member initialization over the explicit out-of-line initialization
for the construction of the local type. NFC.
Modified:
llvm/trunk/lib/Demangle/ItaniumDemangle.cpp
Modified: llvm/trunk/lib/Demangle/ItaniumDemangle.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Demangle/ItaniumDemangle.cpp?rev=287469&r1=287468&r2=287469&view=diff
==============================================================================
--- llvm/trunk/lib/Demangle/ItaniumDemangle.cpp (original)
+++ llvm/trunk/lib/Demangle/ItaniumDemangle.cpp Sat Nov 19 18:20:20 2016
@@ -4233,13 +4233,13 @@ struct Db {
sub_type names;
template_param_type subs;
Vector<template_param_type> template_param;
- unsigned cv;
- unsigned ref;
- unsigned encoding_depth;
- bool parsed_ctor_dtor_cv;
- bool tag_templates;
- bool fix_forward_references;
- bool try_to_parse_template_args;
+ unsigned cv = 0;
+ unsigned ref = 0;
+ unsigned encoding_depth = 0;
+ bool parsed_ctor_dtor_cv = false;
+ bool tag_templates = true;
+ bool fix_forward_references = false;
+ bool try_to_parse_template_args = true;
Db() : subs(0, names), template_param(0, subs) {}
};
@@ -4264,14 +4264,7 @@ char *llvm::itaniumDemangle(const char *
size_t internal_size = buf != nullptr ? *n : 0;
Db db;
- db.cv = 0;
- db.ref = 0;
- db.encoding_depth = 0;
- db.parsed_ctor_dtor_cv = false;
- db.tag_templates = true;
db.template_param.emplace_back();
- db.fix_forward_references = false;
- db.try_to_parse_template_args = true;
int internal_status = success;
demangle(mangled_name, mangled_name + len, db, internal_status);
if (internal_status == success && db.fix_forward_references &&
More information about the llvm-commits
mailing list