summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-11-17 17:23:53 +0000
committerDan Gohman <gohman@apple.com>2010-11-17 17:23:53 +0000
commitff66a7c66dcad93053cde9d3cce6b35fbe5a342c (patch)
treeb8b5545bea974abf5a7b2416e5c5cf0a81fe68f1
parentf41b52516152d8bc0e97d0866b81b90ea4a21712 (diff)
downloadbcm5719-llvm-ff66a7c66dcad93053cde9d3cce6b35fbe5a342c.tar.gz
bcm5719-llvm-ff66a7c66dcad93053cde9d3cce6b35fbe5a342c.zip
Add a comment explaining why r117813 was needed.
llvm-svn: 119518
-rw-r--r--clang/examples/clang-interpreter/main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/examples/clang-interpreter/main.cpp b/clang/examples/clang-interpreter/main.cpp
index 2866c44c3c9..1890848f350 100644
--- a/clang/examples/clang-interpreter/main.cpp
+++ b/clang/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.
OpenPOWER on IntegriCloud