summaryrefslogtreecommitdiffstats
path: root/tools/gold
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2016-10-17 18:51:02 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2016-10-17 18:51:02 +0000
commit58121fbe76eb955883af482107739f0f5054237b (patch)
treeab66306dbfaa3ef506cb3afb276c1645c0aefe4a /tools/gold
parent087ac0bf03d36b49d409aecf7ba6a42d9b6929d0 (diff)
Return a StringRef instead of a Comdat*.
This is a small step in making this interface compatible with an bitcode symbol table. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284408 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/gold')
-rw-r--r--tools/gold/gold-plugin.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/gold/gold-plugin.cpp b/tools/gold/gold-plugin.cpp
index 9bdc7abc5b4f..055c462e69a1 100644
--- a/tools/gold/gold-plugin.cpp
+++ b/tools/gold/gold-plugin.cpp
@@ -526,9 +526,9 @@ static ld_plugin_status claim_file_hook(const ld_plugin_input_file *file,
sym.size = 0;
sym.comdat_key = nullptr;
- const Comdat *C = check(Sym.getComdat());
- if (C)
- sym.comdat_key = strdup(C->getName().str().c_str());
+ StringRef C = check(Sym.getComdat());
+ if (!C.empty())
+ sym.comdat_key = strdup(C.str().c_str());
sym.resolution = LDPR_UNKNOWN;
}