aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbadumbatish <tanghocle456@gmail.com>2024-08-08 14:22:05 -0700
committerCohenArthur <arthur.cohen@embecosm.com>2024-09-02 09:44:55 +0000
commit9597d3c088a3ffc3ca53d2684648f283886930a3 (patch)
tree77bc8a2e3cc27c3446ffb2b192d08ecdb3336815
parentbc341ac3bd22b4b122a86d6fb6d500f3d7c07f52 (diff)
downloadgcc-9597d3c088a3ffc3ca53d2684648f283886930a3.zip
gcc-9597d3c088a3ffc3ca53d2684648f283886930a3.tar.gz
gcc-9597d3c088a3ffc3ca53d2684648f283886930a3.tar.bz2
Use's array type when constring string tree
gcc/rust/ChangeLog: * backend/rust-compile-asm.cc (CompileAsm::asm_build_expr): Use's array type when constring string tree (CompileAsm::asm_construct_string_tree): Use's array type when constring string tree
-rw-r--r--gcc/rust/backend/rust-compile-asm.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/rust/backend/rust-compile-asm.cc b/gcc/rust/backend/rust-compile-asm.cc
index bce49ea..4e01247 100644
--- a/gcc/rust/backend/rust-compile-asm.cc
+++ b/gcc/rust/backend/rust-compile-asm.cc
@@ -26,7 +26,7 @@ CompileAsm::asm_build_expr (HIR::InlineAsm &expr)
ASM_INPUT_P (asm_expr) = expr.is_simple_asm ();
ASM_VOLATILE_P (asm_expr) = false;
ASM_INLINE_P (asm_expr) = expr.is_inline_asm ();
- /*Backend::debug (asm_expr);*/
+ Backend::debug (asm_expr);
return asm_expr;
}
@@ -74,10 +74,10 @@ CompileAsm::asm_construct_string_tree (HIR::InlineAsm &expr)
// debugging and reading)
std::stringstream ss;
for (const auto &template_str : expr.template_strs)
- ss << template_str.symbol << "\n\t";
+ ss << template_str.symbol << "\n";
std::string result = ss.str ();
- return build_string (result.size () + 1, result.c_str ());
+ return Backend::string_constant_expression (result);
}
tree