Simplify. No functionality change.
authorRafael Espindola <rafael.espindola@gmail.com>
Thu, 19 Jun 2014 22:33:23 +0000 (22:33 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Thu, 19 Jun 2014 22:33:23 +0000 (22:33 +0000)
Thanks to Alp Toker for noticing it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211320 91177308-0d34-0410-b5e6-96231b3b80d8

tools/gold/gold-plugin.cpp

index e21a82373f7d06ab5def47981adb5bad1decadf0..2cde5d1c579c27ba3b4504bfbd7e9e74ae15c25a 100644 (file)
@@ -322,8 +322,7 @@ static ld_plugin_status claim_file_hook(const ld_plugin_input_file *file,
 
     cf.syms.push_back(ld_plugin_symbol());
     ld_plugin_symbol &sym = cf.syms.back();
-    sym.name = const_cast<char *>(M->getSymbolName(i));
-    sym.name = strdup(sym.name);
+    sym.name = strdup(M->getSymbolName(i));
     sym.version = NULL;
 
     int scope = attrs & LTO_SYMBOL_SCOPE_MASK;