[PATCH] D26532: Bitcode: Clean up error handling for certain bitcode query functions.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 10 17:20:23 PST 2016


pcc created this revision.
pcc added a reviewer: mehdi_amini.
pcc added subscribers: llvm-commits, lhames.

The functions getBitcodeTargetTriple(), isBitcodeContainingObjCCategory(),
getBitcodeProducerString() and hasGlobalValueSummary() now return errors
via their return value rather than via the diagnostic handler.

To make this work, re-implement these functions using non-member functions
so that they can be used without the LLVMContext required by BitcodeReader.


https://reviews.llvm.org/D26532

Files:
  lld/ELF/Driver.cpp
  lld/ELF/Driver.h
  lld/ELF/InputFiles.cpp
  llvm/include/llvm/Bitcode/ReaderWriter.h
  llvm/include/llvm/Object/ModuleSummaryIndexObjectFile.h
  llvm/lib/Bitcode/Reader/BitcodeReader.cpp
  llvm/lib/LTO/LTO.cpp
  llvm/lib/LTO/LTOModule.cpp
  llvm/lib/LTO/ThinLTOCodeGenerator.cpp
  llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp
  llvm/tools/llvm-lto/llvm-lto.cpp
  llvm/tools/lto/lto.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26532.77576.patch
Type: text/x-patch
Size: 45628 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161111/a51ab3db/attachment-0001.bin>


More information about the llvm-commits mailing list