mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Use printn rather than println. Add string methods for copying.
This commit is contained in:
committed by
Christoffer Lerno
parent
6b928c7a3d
commit
dce171670f
@@ -45,20 +45,18 @@ fn int main()
|
||||
|
||||
define void @foo_Foo_hello(ptr %0) #0 {
|
||||
entry:
|
||||
%1 = call i32 @std_io_println(ptr @.str) #1
|
||||
store ptr @.str, ptr %x, align 8
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @foo_Bar_hello(ptr %0) #0 {
|
||||
entry:
|
||||
%1 = call i32 @std_io_println(ptr @.str.1) #1
|
||||
ret void
|
||||
store ptr @.str.1, ptr %x, align 8
|
||||
}
|
||||
|
||||
define void @foo_MyEnum_hello(ptr %0) #0 {
|
||||
entry:
|
||||
%1 = call i32 @std_io_println(ptr @.str.2) #1
|
||||
ret void
|
||||
store ptr @.str.2, ptr %x, align 8
|
||||
}
|
||||
|
||||
define i32 @main() #0 {
|
||||
@@ -73,4 +71,4 @@ entry:
|
||||
call void @foo_Bar_hello(ptr %b)
|
||||
call void @foo_MyEnum_hello(ptr %a)
|
||||
ret i32 0
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import std::io;
|
||||
|
||||
fn void foo::Bar.test(Bar *bar)
|
||||
{
|
||||
io::println("Inside of baz::Bar.test");
|
||||
io::printn("Inside of baz::Bar.test");
|
||||
}
|
||||
|
||||
module abc;
|
||||
|
||||
@@ -2,7 +2,7 @@ module foo;
|
||||
|
||||
fn void Bar.test(Bar *bar)
|
||||
{
|
||||
io::println("Inside of baz::Bar.test");
|
||||
io::printn("Inside of baz::Bar.test");
|
||||
}
|
||||
|
||||
struct Bar
|
||||
@@ -16,7 +16,7 @@ import std::io;
|
||||
|
||||
fn void foo::Bar.test(Bar *bar) // #error: This method is already defined for 'Bar'
|
||||
{
|
||||
io::println("Inside of baz::Bar.test");
|
||||
io::printn("Inside of baz::Bar.test");
|
||||
}
|
||||
|
||||
module abc;
|
||||
|
||||
@@ -11,12 +11,12 @@ import std::io;
|
||||
|
||||
fn void foo::Bar.test(Bar *bar)
|
||||
{
|
||||
io::println("Inside of baz::Bar.test");
|
||||
io::printn("Inside of baz::Bar.test");
|
||||
}
|
||||
|
||||
fn void Bar.test(Bar *bar) // #error: This method is already defined for
|
||||
{
|
||||
io::println("Inside of baz::Bar.test");
|
||||
io::printn("Inside of baz::Bar.test");
|
||||
}
|
||||
|
||||
module abc;
|
||||
|
||||
Reference in New Issue
Block a user