mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-21 03:37:47 +00:00
[tools] Unbreak the GCC build (workaround a GCC bug).
../tools/llvm-extract/llvm-extract.cpp: In function ‘int main(int, char**)’: warning: ISO C++ forbids zero-size array ‘argv’ [-Wpedantic] GCC reference bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61259 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286396 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d964c86571
commit
003472894d
@ -418,7 +418,8 @@ int main(int argc, char **argv, char * const *envp) {
|
||||
|
||||
// If not jitting lazily, load the whole bitcode file eagerly too.
|
||||
if (NoLazyCompilation) {
|
||||
ExitOnError ExitOnErr(std::string(argv[0]) +
|
||||
// Use *argv instead of argv[0] to work around a wrong GCC warning.
|
||||
ExitOnError ExitOnErr(std::string(*argv) +
|
||||
": bitcode didn't read correctly: ");
|
||||
ExitOnErr(Mod->materializeAll());
|
||||
}
|
||||
|
@ -223,7 +223,8 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
}
|
||||
|
||||
ExitOnError ExitOnErr(std::string(argv[0]) + ": error reading input: ");
|
||||
// Use *argv instead of argv[0] to work around a wrong GCC warning.
|
||||
ExitOnError ExitOnErr(std::string(*argv) + ": error reading input: ");
|
||||
|
||||
auto Materialize = [&](GlobalValue &GV) { ExitOnErr(GV.materialize()); };
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user