[Feature Request] Some way to guarantee using caller stack frame
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
I've been working on creating a programming language with the LLVM backed, and think it would be really interesting if something like the pseudo code below was possible.
```c
[use-caller-stack-frame]
char* temp_error_message(const char* msg){
char error_message[2048];
snprintf(error_message, 2048, "Error: %s", msg);
return error_message;
}
int main(){
char* msg = "This is an error message";
char* error_message = temp_error_message(msg); // valid becuase of [use-parent-stack-frame]
printf("%s\n", error_message);
return 0;
}
```
Contributor guide
Research direction
The issue provides only a C-like pseudocode example involving temp_error_message and main; it names no LLVM files, tests, or implementation entry point. Start by determining which LLVM subsystem would own a caller-stack-frame guarantee and what constraints would define completion, then document the design before attempting implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100