[llvm-commits] [llvm] r106410 - /llvm/trunk/tools/gold/gold-plugin.cpp
Rafael Espindola
rafael.espindola at gmail.com
Sun Jun 20 19:23:12 PDT 2010
Author: rafael
Date: Sun Jun 20 21:23:12 2010
New Revision: 106410
URL: http://llvm.org/viewvc/llvm-project?rev=106410&view=rev
Log:
add_input_file and add_input_library now take const arguments, remove the
const_cast.
Modified:
llvm/trunk/tools/gold/gold-plugin.cpp
Modified: llvm/trunk/tools/gold/gold-plugin.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/gold/gold-plugin.cpp?rev=106410&r1=106409&r2=106410&view=diff
==============================================================================
--- llvm/trunk/tools/gold/gold-plugin.cpp (original)
+++ llvm/trunk/tools/gold/gold-plugin.cpp Sun Jun 20 21:23:12 2010
@@ -439,7 +439,7 @@
lto_codegen_dispose(cg);
- if ((*add_input_file)(const_cast<char*>(uniqueObjPath.c_str())) != LDPS_OK) {
+ if ((*add_input_file)(uniqueObjPath.c_str()) != LDPS_OK) {
(*message)(LDPL_ERROR, "Unable to add .o file to the link.");
(*message)(LDPL_ERROR, "File left behind in: %s", uniqueObjPath.c_str());
return LDPS_ERR;
@@ -449,7 +449,7 @@
e = options::pass_through.end();
i != e; ++i) {
std::string &item = *i;
- char *item_p = const_cast<char*>(item.c_str());
+ const char *item_p = item.c_str();
if (llvm::StringRef(item).startswith("-l")) {
if (add_input_library(item_p + 2) != LDPS_OK) {
(*message)(LDPL_ERROR, "Unable to add library to the link.");
More information about the llvm-commits
mailing list