Issue 178990
Summary [Feature Request]Some way to guarantee using caller stack frame
Labels new issue
Assignees
Reporter brevin33
    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;
}
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to