summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2015-06-19 17:51:46 +0000
committerLang Hames <lhames@gmail.com>2015-06-19 17:51:46 +0000
commitb09c2c6edb6ecbd5bea2a6afed48429d64825e87 (patch)
tree2d16ba6dd691b7437a8ad875402f4e4dbb813675 /lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp
parent261a89b0f70b3193b5358698eb92d18c4c855b36 (diff)
downloadbcm5719-llvm-b09c2c6edb6ecbd5bea2a6afed48429d64825e87.tar.gz
bcm5719-llvm-b09c2c6edb6ecbd5bea2a6afed48429d64825e87.zip
[lld] Allow LLD passes to return error codes.
llvm-svn: 240147
Diffstat (limited to 'lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp')
-rw-r--r--lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp b/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp
index aae81a27cd8..97925f3d1fe 100644
--- a/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp
+++ b/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp
@@ -277,7 +277,7 @@ public:
_isBig(MachOLinkingContext::isBigEndian(_ctx.arch())) {}
private:
- void perform(std::unique_ptr<SimpleFile> &mergedFile) override {
+ std::error_code perform(std::unique_ptr<SimpleFile> &mergedFile) override {
DEBUG(llvm::dbgs() << "MachO Compact Unwind pass\n");
std::map<const Atom *, CompactUnwindEntry> unwindLocs;
@@ -294,7 +294,7 @@ private:
// Skip rest of pass if no unwind info.
if (unwindLocs.empty() && dwarfFrames.empty())
- return;
+ return std::error_code();
// FIXME: if there are more than 4 personality functions then we need to
// defer to DWARF info for the ones we don't put in the list. They should
@@ -348,6 +348,8 @@ private:
mergedFile->removeDefinedAtomsIf([](const DefinedAtom *atom) {
return atom->contentType() == DefinedAtom::typeCompactUnwindInfo;
});
+
+ return std::error_code();
}
void collectCompactUnwindEntries(
OpenPOWER on IntegriCloud