diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2010-06-21 02:23:12 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2010-06-21 02:23:12 +0000 |
commit | bebb640b6b495b89f37dde7921f88f24deaf00be (patch) | |
tree | cb56ee42bb8df2224d71dde17537a4e002f6a1b0 /tools/gold/gold-plugin.cpp | |
parent | bc2ed599e877b9d76bd548546019f98ae256fe9b (diff) | |
download | external_llvm-bebb640b6b495b89f37dde7921f88f24deaf00be.zip external_llvm-bebb640b6b495b89f37dde7921f88f24deaf00be.tar.gz external_llvm-bebb640b6b495b89f37dde7921f88f24deaf00be.tar.bz2 |
add_input_file and add_input_library now take const arguments, remove the
const_cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106410 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/gold/gold-plugin.cpp')
-rw-r--r-- | tools/gold/gold-plugin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/gold/gold-plugin.cpp b/tools/gold/gold-plugin.cpp index c8542b1..15ad405 100644 --- a/tools/gold/gold-plugin.cpp +++ b/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."); |