[llvm] 69dad32 - [TableGen] [NFC] Make argv0 const
Alex Brachet via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 25 13:43:04 PDT 2020
Author: Alex Brachet
Date: 2020-04-25T16:42:38-04:00
New Revision: 69dad324db3a73c261a0bf9273becb06d78e53ed
URL: https://github.com/llvm/llvm-project/commit/69dad324db3a73c261a0bf9273becb06d78e53ed
DIFF: https://github.com/llvm/llvm-project/commit/69dad324db3a73c261a0bf9273becb06d78e53ed.diff
LOG: [TableGen] [NFC] Make argv0 const
`argv0` was never being modified. No changes made except to the type.
Reviewed By: RKSimon
Differential Revision: https://reviews.llvm.org/D78840
Added:
Modified:
llvm/include/llvm/TableGen/Main.h
llvm/lib/TableGen/Main.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/TableGen/Main.h b/llvm/include/llvm/TableGen/Main.h
index e464cd4d4fb5..4e05da36168f 100644
--- a/llvm/include/llvm/TableGen/Main.h
+++ b/llvm/include/llvm/TableGen/Main.h
@@ -22,7 +22,7 @@ class RecordKeeper;
/// Returns true on error, false otherwise.
using TableGenMainFn = bool (raw_ostream &OS, RecordKeeper &Records);
-int TableGenMain(char *argv0, TableGenMainFn *MainFn);
+int TableGenMain(const char *argv0, TableGenMainFn *MainFn);
} // end namespace llvm
diff --git a/llvm/lib/TableGen/Main.cpp b/llvm/lib/TableGen/Main.cpp
index 427bd6778577..77f1b61cf930 100644
--- a/llvm/lib/TableGen/Main.cpp
+++ b/llvm/lib/TableGen/Main.cpp
@@ -80,7 +80,7 @@ static int createDependencyFile(const TGParser &Parser, const char *argv0) {
return 0;
}
-int llvm::TableGenMain(char *argv0, TableGenMainFn *MainFn) {
+int llvm::TableGenMain(const char *argv0, TableGenMainFn *MainFn) {
RecordKeeper Records;
// Parse the input file.
More information about the llvm-commits
mailing list