]> granicus.if.org Git - llvm/commit
Bitcode: Clean up error handling for certain bitcode query functions.
authorPeter Collingbourne <peter@pcc.me.uk>
Fri, 11 Nov 2016 19:50:24 +0000 (19:50 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Fri, 11 Nov 2016 19:50:24 +0000 (19:50 +0000)
commit9b252f03d92e5474d84036822e4472f07763e1d6
treed5bf13939f3ca7288190bd71bdb446cef003e892
parent3352395b1c2ba18c1e7afd5e68ab20a4f4486df4
Bitcode: Clean up error handling for certain bitcode query functions.

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.

Differential Revision: https://reviews.llvm.org/D26532

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286623 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Bitcode/BitcodeReader.h
include/llvm/Object/ModuleSummaryIndexObjectFile.h
lib/Bitcode/Reader/BitcodeReader.cpp
lib/LTO/LTO.cpp
lib/LTO/LTOModule.cpp
lib/LTO/ThinLTOCodeGenerator.cpp
lib/Object/ModuleSummaryIndexObjectFile.cpp
tools/llvm-lto/llvm-lto.cpp
tools/lto/lto.cpp