diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-12-03 23:56:42 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-12-03 23:56:42 +0000 |
commit | a06bb16f95296840f6b6a30a2e7e748c3f5fb855 (patch) | |
tree | fccc5cd63cbc191dd27bd29f94689576fbc03661 /llvm/lib/LTO/LTOModule.cpp | |
parent | f3129cbd846f853c19aae9df92dd9f3460155529 (diff) | |
download | bcm5719-llvm-a06bb16f95296840f6b6a30a2e7e748c3f5fb855.tar.gz bcm5719-llvm-a06bb16f95296840f6b6a30a2e7e748c3f5fb855.zip |
Simplify since this function never fails.
llvm-svn: 254667
Diffstat (limited to 'llvm/lib/LTO/LTOModule.cpp')
-rw-r--r-- | llvm/lib/LTO/LTOModule.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/llvm/lib/LTO/LTOModule.cpp b/llvm/lib/LTO/LTOModule.cpp index d28563c23b8..42a568b54c7 100644 --- a/llvm/lib/LTO/LTOModule.cpp +++ b/llvm/lib/LTO/LTOModule.cpp @@ -252,11 +252,7 @@ LTOModule *LTOModule::makeLTOModule(MemoryBufferRef Buffer, else Ret = new LTOModule(std::move(IRObj), target); - if (Ret->parseSymbols(errMsg)) { - delete Ret; - return nullptr; - } - + Ret->parseSymbols(); Ret->parseMetadata(); return Ret; @@ -592,9 +588,7 @@ void LTOModule::addPotentialUndefinedSymbol(const object::BasicSymbolRef &Sym, info.symbol = decl; } -/// parseSymbols - Parse the symbols from the module and model-level ASM and add -/// them to either the defined or undefined lists. -bool LTOModule::parseSymbols(std::string &errMsg) { +void LTOModule::parseSymbols() { for (auto &Sym : IRFile->symbols()) { const GlobalValue *GV = IRFile->getSymbolGV(Sym.getRawDataRefImpl()); uint32_t Flags = Sym.getFlags(); @@ -649,8 +643,6 @@ bool LTOModule::parseSymbols(std::string &errMsg) { NameAndAttributes info = u->getValue(); _symbols.push_back(info); } - - return false; } /// parseMetadata - Parse metadata from the module |