diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2016-10-17 18:51:02 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2016-10-17 18:51:02 +0000 |
commit | 62382c930d2fb403d1876bb8d0a8c50665dce704 (patch) | |
tree | 113dfa26c69a8dc36130e911191a58dffbe9b38c /llvm/tools/gold/gold-plugin.cpp | |
parent | c197ae0d74a71c45788a6872f57f51b024ef7c02 (diff) | |
download | bcm5719-llvm-62382c930d2fb403d1876bb8d0a8c50665dce704.tar.gz bcm5719-llvm-62382c930d2fb403d1876bb8d0a8c50665dce704.zip |
Return a StringRef instead of a Comdat*.
This is a small step in making this interface compatible with an
bitcode symbol table.
llvm-svn: 284408
Diffstat (limited to 'llvm/tools/gold/gold-plugin.cpp')
-rw-r--r-- | llvm/tools/gold/gold-plugin.cpp | 6 |
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; } |