https://gcc.gnu.org/g:d3be8cb777bc74f85b4e06df054b42c441bf5df9

commit r15-8353-gd3be8cb777bc74f85b4e06df054b42c441bf5df9
Author: badumbatish <tanghocle...@gmail.com>
Date:   Thu Aug 8 14:22:05 2024 -0700

    gccrs: 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

Diff:
---
 gcc/rust/backend/rust-compile-asm.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gcc/rust/backend/rust-compile-asm.cc 
b/gcc/rust/backend/rust-compile-asm.cc
index d179c355f21a..92d60d756864 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_BASIC_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

Reply via email to