We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d491387 commit e225651Copy full SHA for e225651
common/init_llvm.cpp
@@ -17,13 +17,13 @@ InitLLVM::InitLLVM(int& argc, char**& argv)
17
// make a copy of the argv that LLVM produces in order to support
18
// mutation.
19
args_(argv, argv + argc) {
20
+ // `argv[argc]` is expected to be a null pointer (may reallocate `args_`).
21
+ args_.push_back(nullptr);
22
+
23
// Return our mutable copy of argv for the program to use.
- argc = args_.size();
24
+ argc = args_.size() - 1;
25
argv = args_.data();
26
- // `argv[argc]` is expected to be a null pointer.
- args_.push_back(nullptr);
-
27
llvm::setBugReportMsg(
28
"Please report issues to "
29
"https://github.com/carbon-language/carbon-lang/issues and include the "
0 commit comments