summaryrefslogtreecommitdiffstats
path: root/llvm/tools/gold/gold-plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/gold/gold-plugin.cpp')
-rw-r--r--llvm/tools/gold/gold-plugin.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp
index 9bdc7abc5b4..055c462e69a 100644
--- a/llvm/tools/gold/gold-plugin.cpp
+++ b/llvm/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;
}
OpenPOWER on IntegriCloud