summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2010-06-21 02:23:12 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2010-06-21 02:23:12 +0000
commit9d94ebf1b6c66a0258d4e1e73fde1e425c919321 (patch)
tree63d7a6a24e78d43e870d221c30211c383b46ff61
parent720f49ed86049ee51539ebac313f4d91c9a6d052 (diff)
downloadbcm5719-llvm-9d94ebf1b6c66a0258d4e1e73fde1e425c919321.tar.gz
bcm5719-llvm-9d94ebf1b6c66a0258d4e1e73fde1e425c919321.zip
add_input_file and add_input_library now take const arguments, remove the
const_cast. llvm-svn: 106410
-rw-r--r--llvm/tools/gold/gold-plugin.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp
index c8542b17520..15ad405c6ac 100644
--- a/llvm/tools/gold/gold-plugin.cpp
+++ b/llvm/tools/gold/gold-plugin.cpp
@@ -439,7 +439,7 @@ static ld_plugin_status all_symbols_read_hook(void) {
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 @@ static ld_plugin_status all_symbols_read_hook(void) {
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.");
OpenPOWER on IntegriCloud