aboutsummaryrefslogtreecommitdiff
path: root/lib/CompilerDriver/Main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CompilerDriver/Main.cpp')
-rw-r--r--lib/CompilerDriver/Main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CompilerDriver/Main.cpp b/lib/CompilerDriver/Main.cpp
index 6807a83006..3a2917032e 100644
--- a/lib/CompilerDriver/Main.cpp
+++ b/lib/CompilerDriver/Main.cpp
@@ -71,11 +71,16 @@ namespace {
namespace llvmc {
+// Sometimes plugins want to condition on the value in argv[0].
+const char* ProgramName;
+
int Main(int argc, char** argv) {
try {
LanguageMap langMap;
CompilationGraph graph;
+ ProgramName = argv[0];
+
cl::ParseCommandLineOptions
(argc, argv, "LLVM Compiler Driver (Work In Progress)", true);