diff options
Diffstat (limited to 'llvm/tools/llvm-extract/llvm-extract.cpp')
-rw-r--r-- | llvm/tools/llvm-extract/llvm-extract.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/tools/llvm-extract/llvm-extract.cpp b/llvm/tools/llvm-extract/llvm-extract.cpp index e576d0893bf..aa1eda2f094 100644 --- a/llvm/tools/llvm-extract/llvm-extract.cpp +++ b/llvm/tools/llvm-extract/llvm-extract.cpp @@ -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()); }; |