summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Naumann <Axel.Naumann@cern.ch>2010-10-11 09:13:46 +0000
committerAxel Naumann <Axel.Naumann@cern.ch>2010-10-11 09:13:46 +0000
commit89c31490d8896dbb6a9794de28a874a84268f541 (patch)
tree0653428cda5c717f35fa7c0905dd6425b9e845c2
parente1bcb43bb9442691bc40717f3f003f2a8f0f5809 (diff)
downloadbcm5719-llvm-89c31490d8896dbb6a9794de28a874a84268f541.tar.gz
bcm5719-llvm-89c31490d8896dbb6a9794de28a874a84268f541.zip
Tighten up constness of argv parameters to allow for string literals as argumants and to reflect actual (non-modifying) use.
llvm-svn: 116199
-rw-r--r--clang/include/clang/Frontend/CompilerInstance.h5
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp6
2 files changed, 6 insertions, 5 deletions
diff --git a/clang/include/clang/Frontend/CompilerInstance.h b/clang/include/clang/Frontend/CompilerInstance.h
index 800d5be0685..410129ab7a4 100644
--- a/clang/include/clang/Frontend/CompilerInstance.h
+++ b/clang/include/clang/Frontend/CompilerInstance.h
@@ -474,7 +474,7 @@ public:
/// and replace any existing one with it.
///
/// Note that this routine also replaces the diagnostic client.
- void createDiagnostics(int Argc, char **Argv);
+ void createDiagnostics(int Argc, const char* const *Argv);
/// Create a Diagnostic object with a the TextDiagnosticPrinter.
///
@@ -492,7 +492,8 @@ public:
///
/// \return The new object on success, or null on failure.
static llvm::IntrusiveRefCntPtr<Diagnostic>
- createDiagnostics(const DiagnosticOptions &Opts, int Argc, char **Argv);
+ createDiagnostics(const DiagnosticOptions &Opts, int Argc,
+ const char* const *Argv);
/// Create the file manager and replace any existing one with it.
void createFileManager();
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index e3eb8591537..939766351d1 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -109,7 +109,7 @@ void BinaryDiagnosticSerializer::HandleDiagnostic(Diagnostic::Level DiagLevel,
}
static void SetUpBuildDumpLog(const DiagnosticOptions &DiagOpts,
- unsigned argc, char **argv,
+ unsigned argc, const char* const *argv,
Diagnostic &Diags) {
std::string ErrorInfo;
llvm::OwningPtr<llvm::raw_ostream> OS(
@@ -131,13 +131,13 @@ static void SetUpBuildDumpLog(const DiagnosticOptions &DiagOpts,
Diags.setClient(new ChainedDiagnosticClient(Diags.takeClient(), Logger));
}
-void CompilerInstance::createDiagnostics(int Argc, char **Argv) {
+void CompilerInstance::createDiagnostics(int Argc, const char* const *Argv) {
Diagnostics = createDiagnostics(getDiagnosticOpts(), Argc, Argv);
}
llvm::IntrusiveRefCntPtr<Diagnostic>
CompilerInstance::createDiagnostics(const DiagnosticOptions &Opts,
- int Argc, char **Argv) {
+ int Argc, const char* const *Argv) {
llvm::IntrusiveRefCntPtr<Diagnostic> Diags(new Diagnostic());
// Create the diagnostic client for reporting errors or for
OpenPOWER on IntegriCloud