aaron.ballman added a comment.

Given that we already have other setters to set global state, I'm less 
concerned about adding another one. I hadn't realized we already introduced the 
dangers here. But we should document the expectation that the call be made 
before creating the index.

In terms of the C API, I think it'd make more sense to name in terms of 
"override" rather than "set", but I don't feel as strongly about it given the 
other setters. In terms of the C++ file system API, I think "override" makes 
the most sense though (we don't have setters to follow the naming convention 
for) because some systems do allow you to set the system directory.

In terms of memory ownership, WDYT of requiring the caller to handle this? 
e.g., calling `set_system_temp_directory_erased_on_reboot` will `strdup` a 
nonnull pointer and `free` the stored pointer when given nullptr.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139774/new/

https://reviews.llvm.org/D139774

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to