diff options
author | Dan Gohman <gohman@apple.com> | 2010-11-17 17:23:53 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-11-17 17:23:53 +0000 |
commit | ea1924e62162b299d797d23992a466142b3c6c68 (patch) | |
tree | 3617eb7d7c3e3f3a47dbf80767d49adf7c56e614 /examples | |
parent | 4659e1e2e06983e4de77040315537aa86984cec8 (diff) |
Add a comment explaining why r117813 was needed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119518 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'examples')
-rw-r--r-- | examples/clang-interpreter/main.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/clang-interpreter/main.cpp b/examples/clang-interpreter/main.cpp index 2866c44c3c..1890848f35 100644 --- a/examples/clang-interpreter/main.cpp +++ b/examples/clang-interpreter/main.cpp @@ -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. |