Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comptime return value LLVM #170

Open
travisdoor opened this issue Jul 28, 2023 · 0 comments
Open

Comptime return value LLVM #170

travisdoor opened this issue Jul 28, 2023 · 0 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@travisdoor
Copy link
Owner

We can now convert only string literals []u8 to heap data in LLVM IR. We might consider do it for more types, or at least do proper error reporting.

main :: fn () s32 {
    print("%\n", ARR);
    return 0;
}


ARR :: call_me();

call_me :: fn () []u32 #comptime {
    tmp: []u32;
    alloc_slice(&tmp, 10);
    return tmp;
}
@travisdoor travisdoor added bug Something isn't working enhancement New feature or request labels Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant