Add a comment explaining why r117813 was needed.

llvm-svn: 119518
This commit is contained in:
Dan Gohman 2010-11-17 17:23:53 +00:00
parent f41b525161
commit ff66a7c66d
1 changed files with 5 additions and 0 deletions

View File

@ -32,6 +32,11 @@
using namespace clang;
using namespace clang::driver;
// This function isn't referenced outside its translation unit, but it
// can't use the "static" keyword because its address is used for
// GetMainExecutable (since some platforms don't support taking the
// address of main, and some platforms can't implement GetMainExecutable
// without being given the address of a function in the main executable).
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.