llvm-project
bf7d2647 - [BuildLibCalls] Do not mark ctermid argument as nocapture (#241813)

Commit
1 hour ago
[BuildLibCalls] Do not mark ctermid argument as nocapture (#241813) Remove setDoesNotCapture flag from ctermid. char* ctermid(char* s), according to POSIX spec returns either address of static buffer, or its argument if non-NULL, which counts as capture. This was detected with RTEMS tests, clang incorrectly optimized out input to ctermid assuming nocapture.
Author
Parents
Loading