[llvm-commits] [llvm] r101656 - in /llvm/trunk/tools: llvm-ld/llvm-ld.cpp lto/LTOCodeGenerator.cpp

Dan Gohman gohman at apple.com
Sat Apr 17 10:44:03 PDT 2010


Author: djg
Date: Sat Apr 17 12:44:03 2010
New Revision: 101656

URL: http://llvm.org/viewvc/llvm-project?rev=101656&view=rev
Log:
Fix more -Wcast-qual warnings.

Modified:
    llvm/trunk/tools/llvm-ld/llvm-ld.cpp
    llvm/trunk/tools/lto/LTOCodeGenerator.cpp

Modified: llvm/trunk/tools/llvm-ld/llvm-ld.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-ld/llvm-ld.cpp?rev=101656&r1=101655&r2=101656&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-ld/llvm-ld.cpp (original)
+++ llvm/trunk/tools/llvm-ld/llvm-ld.cpp Sat Apr 17 12:44:03 2010
@@ -399,7 +399,7 @@
 
   // 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;
 }

Modified: llvm/trunk/tools/lto/LTOCodeGenerator.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/LTOCodeGenerator.cpp?rev=101656&r1=101655&r2=101656&view=diff
==============================================================================
--- llvm/trunk/tools/lto/LTOCodeGenerator.cpp (original)
+++ llvm/trunk/tools/lto/LTOCodeGenerator.cpp Sat Apr 17 12:44:03 2010
@@ -370,7 +370,7 @@
     // 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;





More information about the llvm-commits mailing list