|
|
@@ -17,13 +17,13 @@ InitLLVM::InitLLVM(int& argc, char**& argv)
|
|
|
// make a copy of the argv that LLVM produces in order to support
|
|
|
// mutation.
|
|
|
args_(argv, argv + argc) {
|
|
|
+ // `argv[argc]` is expected to be a null pointer (may reallocate `args_`).
|
|
|
+ args_.push_back(nullptr);
|
|
|
+
|
|
|
// Return our mutable copy of argv for the program to use.
|
|
|
- argc = args_.size();
|
|
|
+ argc = args_.size() - 1;
|
|
|
argv = args_.data();
|
|
|
|
|
|
- // `argv[argc]` is expected to be a null pointer.
|
|
|
- args_.push_back(nullptr);
|
|
|
-
|
|
|
llvm::setBugReportMsg(
|
|
|
"Please report issues to "
|
|
|
"https://github.com/carbon-language/carbon-lang/issues and include the "
|