mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-23 01:24:30 +00:00
Port GetMainExecutable over to PathV2.
I will remove the V1 version as soon as I change clang in the next commit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184914 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -162,11 +162,11 @@ Typical components:\n\
|
||||
}
|
||||
|
||||
/// \brief Compute the path to the main executable.
|
||||
llvm::sys::Path GetExecutablePath(const char *Argv0) {
|
||||
std::string GetExecutablePath(const char *Argv0) {
|
||||
// This just needs to be some symbol in the binary; C++ doesn't
|
||||
// allow taking the address of ::main however.
|
||||
void *P = (void*) (intptr_t) GetExecutablePath;
|
||||
return llvm::sys::Path::GetMainExecutable(Argv0, P);
|
||||
return llvm::sys::fs::getMainExecutable(Argv0, P);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
@ -180,7 +180,7 @@ int main(int argc, char **argv) {
|
||||
// tree.
|
||||
bool IsInDevelopmentTree;
|
||||
enum { MakefileStyle, CMakeStyle, CMakeBuildModeStyle } DevelopmentTreeLayout;
|
||||
llvm::SmallString<256> CurrentPath(GetExecutablePath(argv[0]).str());
|
||||
llvm::SmallString<256> CurrentPath(GetExecutablePath(argv[0]));
|
||||
std::string CurrentExecPrefix;
|
||||
std::string ActiveObjRoot;
|
||||
|
||||
|
Reference in New Issue
Block a user