diff options
author | Lang Hames <lhames@gmail.com> | 2015-06-19 17:51:46 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2015-06-19 17:51:46 +0000 |
commit | b09c2c6edb6ecbd5bea2a6afed48429d64825e87 (patch) | |
tree | 2d16ba6dd691b7437a8ad875402f4e4dbb813675 /lld/lib/ReaderWriter/PECOFF/LoadConfigPass.cpp | |
parent | 261a89b0f70b3193b5358698eb92d18c4c855b36 (diff) | |
download | bcm5719-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/PECOFF/LoadConfigPass.cpp')
-rw-r--r-- | lld/lib/ReaderWriter/PECOFF/LoadConfigPass.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lld/lib/ReaderWriter/PECOFF/LoadConfigPass.cpp b/lld/lib/ReaderWriter/PECOFF/LoadConfigPass.cpp index f2a9609e863..bebe26bf825 100644 --- a/lld/lib/ReaderWriter/PECOFF/LoadConfigPass.cpp +++ b/lld/lib/ReaderWriter/PECOFF/LoadConfigPass.cpp @@ -49,9 +49,9 @@ LoadConfigAtom::LoadConfigAtom(VirtualFile &file, const DefinedAtom *sxdata, } // namespace loadcfg -void LoadConfigPass::perform(std::unique_ptr<SimpleFile> &file) { +std::error_code LoadConfigPass::perform(std::unique_ptr<SimpleFile> &file) { if (_ctx.noSEH()) - return; + return std::error_code(); // Find the first atom in .sxdata section. const DefinedAtom *sxdata = nullptr; @@ -64,11 +64,13 @@ void LoadConfigPass::perform(std::unique_ptr<SimpleFile> &file) { } } if (!sxdata) - return; + return std::error_code(); auto *loadcfg = new (_alloc) loadcfg::LoadConfigAtom(_file, sxdata, sectionSize / sizeof(uint32_t)); file->addAtom(*loadcfg); + + return std::error_code(); } } // namespace pecoff |