Implemented (for AIX) a function to take any function and return the path of the load module it is located in. Used this function to implement getMainExecutable for AIX (instead of incorrectly attempting to use /proc) Additionally, fixed multiple locations where getMainExecutable was used incorrectly.
|44 ↗||(On Diff #238095)|
I'm not sure that this function should handle failure by returning an empty string. The error condition can be made explicit by making the return type of the function llvm::Expected<SmallString<128>>.
|38 ↗||(On Diff #238095)|
This should be an internal function in the .cpp file implementing the following function. It should not be declared in an interface .h file.
|42 ↗||(On Diff #238095)|
The description of FileUtilities.h does not seem to encompass what this function does. Perhaps SystemUtils.h works better? fyi, when posting patches to Phabricator, the "full context" (using diff -U <large number>) should be provided.
Provided that you have squashed all changes into the latest commit in your branch, git diff HEAD^ -U10000 should emit the context you need. Adjust the number of lines of context accordingly to fit the size of your files.