diff options
author | Andi Kleen <ak@linux.intel.com> | 2024-06-12 06:59:37 -0700 |
---|---|---|
committer | Andi Kleen <ak@linux.intel.com> | 2024-06-12 08:24:07 -0700 |
commit | bd6bc352d96304a13da63fed6aeb1615be535fd7 (patch) | |
tree | 5658d790c7d45b79745a4d889df1b27acb0a1af8 /gcc/cp/parser.cc | |
parent | bd3a312728fbf8c35a09239b9180269f938f872e (diff) | |
download | gcc-bd6bc352d96304a13da63fed6aeb1615be535fd7.zip gcc-bd6bc352d96304a13da63fed6aeb1615be535fd7.tar.gz gcc-bd6bc352d96304a13da63fed6aeb1615be535fd7.tar.bz2 |
Move cexpr_stree tree string build into utility function
No semantics changes.
gcc/cp/ChangeLog:
* cp-tree.h (extract): Add new overload to return tree.
* parser.cc (cp_parser_asm_string_expression): Use tree extract.
* semantics.cc (cexpr_str::extract): Add new overload to return
tree.
Diffstat (limited to 'gcc/cp/parser.cc')
-rw-r--r-- | gcc/cp/parser.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc index 6cd7274..de5f048 100644 --- a/gcc/cp/parser.cc +++ b/gcc/cp/parser.cc @@ -22862,12 +22862,9 @@ cp_parser_asm_string_expression (cp_parser *parser) cexpr_str cstr (string); if (!cstr.type_check (tok->location)) return error_mark_node; - const char *msg; - int len; - if (!cstr.extract (tok->location, msg, len)) + if (!cstr.extract (tok->location, string)) return error_mark_node; parens.require_close (parser); - string = build_string (len, msg); return string; } else if (!cp_parser_is_string_literal (tok)) |