зеркало из https://github.com/microsoft/clang-1.git
Turns out that we may end up calling dladdr on GetExecutablePath, give it external linkage to make sure the lookup works on all platforms.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117813 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
5e0cc38286
Коммит
aeed3da83c
|
@ -32,7 +32,7 @@
|
|||
using namespace clang;
|
||||
using namespace clang::driver;
|
||||
|
||||
static llvm::sys::Path GetExecutablePath(const char *Argv0) {
|
||||
llvm::sys::Path 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 *MainAddr = (void*) (intptr_t) GetExecutablePath;
|
||||
|
|
|
@ -36,8 +36,7 @@
|
|||
using namespace clang;
|
||||
using namespace clang::driver;
|
||||
|
||||
static llvm::sys::Path GetExecutablePath(const char *Argv0,
|
||||
bool CanonicalPrefixes) {
|
||||
llvm::sys::Path GetExecutablePath(const char *Argv0, bool CanonicalPrefixes) {
|
||||
if (!CanonicalPrefixes)
|
||||
return llvm::sys::Path(Argv0);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче