[llvm-commits] [dragonegg] r101891 - in /dragonegg/trunk: llvm-backend.cpp llvm-convert.cpp
Duncan Sands
baldrick at free.fr
Tue Apr 20 01:08:20 PDT 2010
Author: baldrick
Date: Tue Apr 20 03:08:20 2010
New Revision: 101891
URL: http://llvm.org/viewvc/llvm-project?rev=101891&view=rev
Log:
Inform the compiler that, yes, we really mean to drop the const-ness here.
Modified:
dragonegg/trunk/llvm-backend.cpp
dragonegg/trunk/llvm-convert.cpp
Modified: dragonegg/trunk/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-backend.cpp?rev=101891&r1=101890&r2=101891&view=diff
==============================================================================
--- dragonegg/trunk/llvm-backend.cpp (original)
+++ dragonegg/trunk/llvm-backend.cpp Tue Apr 20 03:08:20 2010
@@ -426,7 +426,7 @@
Args.push_back(0); // Null terminator.
int pseudo_argc = Args.size()-1;
- llvm::cl::ParseCommandLineOptions(pseudo_argc, (char**)&Args[0]);
+ llvm::cl::ParseCommandLineOptions(pseudo_argc, const_cast<char**>(&Args[0]));
Configured = true;
}
Modified: dragonegg/trunk/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-convert.cpp?rev=101891&r1=101890&r2=101891&view=diff
==============================================================================
--- dragonegg/trunk/llvm-convert.cpp (original)
+++ dragonegg/trunk/llvm-convert.cpp Tue Apr 20 03:08:20 2010
@@ -3353,7 +3353,7 @@
static void FreeConstTupleStrings(const char **ReplacementStrings,
unsigned int Size) {
for (unsigned int i=0; i<Size; i++)
- free((char *)ReplacementStrings[i]);
+ free(const_cast<char *>(ReplacementStrings[i]));
}
// When extracting a register name from a DECL_HARD_REGISTER variable,
More information about the llvm-commits
mailing list