-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add solutions for advent of code 2024 day 1 to examples/
.
#4673
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
@@ -0,0 +1,142 @@ | |||
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These files don't really have much in terms of documentation. Would it be worth at least adding a README.md explaining what you're doing here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding the return type question you just asked -- consider me now neutral, the narrow delta of this change doesn't seem that bad to review. But, maybe fixing global variables should be in the PR title?
Split the bugfix out to #4674. |
This adds two new builtins to the toolchain: `print.char` and `read.char`, which map to the libc functions `putchar` and `getchar`. Also fixes a bug where global variables would create LLVM variable declarations, not definitions, resulting in link errors.
prelude. Move the existing `Print` there too.
1b8575a
to
1a2d734
Compare
In order to support these examples, this adds two new builtins to the toolchain:
print.char
andread.char
, which map to the libc functionsputchar
andgetchar
.