aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-04-17 17:44:03 +0000
committerDan Gohman <gohman@apple.com>2010-04-17 17:44:03 +0000
commit43bc70ebef7faafbe986dbc5950db0e56e9f05b4 (patch)
treed1ea0d5beb012a456054b589d773608fdfaad738
parent3fb150a9024a38872ec4abbc3300e08a8bfc1812 (diff)
downloadexternal_llvm-43bc70ebef7faafbe986dbc5950db0e56e9f05b4.zip
external_llvm-43bc70ebef7faafbe986dbc5950db0e56e9f05b4.tar.gz
external_llvm-43bc70ebef7faafbe986dbc5950db0e56e9f05b4.tar.bz2
Fix more -Wcast-qual warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101656 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--tools/llvm-ld/llvm-ld.cpp2
-rw-r--r--tools/lto/LTOCodeGenerator.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/llvm-ld/llvm-ld.cpp b/tools/llvm-ld/llvm-ld.cpp
index 29b74b8..ce52b59 100644
--- a/tools/llvm-ld/llvm-ld.cpp
+++ b/tools/llvm-ld/llvm-ld.cpp
@@ -399,7 +399,7 @@ static int GenerateNative(const std::string &OutputFilename,
// Run the compiler to assembly and link together the program.
int R = sys::Program::ExecuteAndWait(
- gcc, &Args[0], (const char**)clean_env, 0, 0, 0, &ErrMsg);
+ gcc, &Args[0], const_cast<const char **>(clean_env), 0, 0, 0, &ErrMsg);
delete [] clean_env;
return R;
}
diff --git a/tools/lto/LTOCodeGenerator.cpp b/tools/lto/LTOCodeGenerator.cpp
index bc65b3a..3ce22e5 100644
--- a/tools/lto/LTOCodeGenerator.cpp
+++ b/tools/lto/LTOCodeGenerator.cpp
@@ -370,7 +370,7 @@ bool LTOCodeGenerator::generateAssemblyCode(formatted_raw_ostream& out,
// if options were requested, set them
if ( !_codegenOptions.empty() )
cl::ParseCommandLineOptions(_codegenOptions.size(),
- (char**)&_codegenOptions[0]);
+ const_cast<char **>(&_codegenOptions[0]));
// Instantiate the pass manager to organize the passes.
PassManager passes;