summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2018-08-21 23:28:12 +0000
committerFangrui Song <maskray@google.com>2018-08-21 23:28:12 +0000
commit887ec751732efa1cc4508ce524f7e72b4e597e45 (patch)
tree4ff03e4e491ea6d97719bc70b9c72712cdf5bc60 /llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
parent5f0976a6d1043fa47debf232772d2fa1714a0a56 (diff)
downloadbcm5719-llvm-887ec751732efa1cc4508ce524f7e72b4e597e45.tar.gz
bcm5719-llvm-887ec751732efa1cc4508ce524f7e72b4e597e45.zip
[ELF] -thinlto-object-suffix-replace=: don't error if the path does not end with old suffix
Summary: For -thinlto-object-suffix-replace=old\;new, in tools/gold/gold-plugin.cpp, the thinlto object filename is Path minus optional old suffix. static std::string getThinLTOObjectFileName(StringRef Path, StringRef OldSuffix, StringRef NewSuffix) { if (OldSuffix.empty() && NewSuffix.empty()) return Path; StringRef NewPath = Path; NewPath.consume_back(OldSuffix); std::string NewNewPath = NewPath; NewNewPath += NewSuffix; return NewNewPath; } Currently lld will error that the path does not end with old suffix. This patch makes lld accept such paths but only add new suffix if Path ends with old suffix. This fixes a link error where bitcode members in an archive are regular LTO objects without old suffix. Acording to tejohnson, this will "enable supporting mix and match of minimized ThinLTO bitcode files with normal ThinLTO bitcode files in a single link (where we want to apply the suffix replacement to the minimized files, and just ignore it for the normal ThinLTO files)." Reviewers: ruiu, pcc, tejohnson, espindola Reviewed By: tejohnson Subscribers: emaste, inglorion, arichardson, eraman, steven_wu, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D51055 llvm-svn: 340364
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud