[llvm] r212340 - Remove unused old-style error handling.
Rafael Espindola
rafael.espindola at gmail.com
Fri Jul 4 06:30:14 PDT 2014
Author: rafael
Date: Fri Jul 4 08:30:13 2014
New Revision: 212340
URL: http://llvm.org/viewvc/llvm-project?rev=212340&view=rev
Log:
Remove unused old-style error handling.
If needed, an ErrorOr should be used.
Modified:
llvm/trunk/include/llvm/Bitcode/ReaderWriter.h
llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
Modified: llvm/trunk/include/llvm/Bitcode/ReaderWriter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Bitcode/ReaderWriter.h?rev=212340&r1=212339&r2=212340&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Bitcode/ReaderWriter.h (original)
+++ llvm/trunk/include/llvm/Bitcode/ReaderWriter.h Fri Jul 4 08:30:13 2014
@@ -41,14 +41,11 @@ namespace llvm {
LLVMContext &Context,
std::string *ErrMsg = nullptr);
- /// getBitcodeTargetTriple - Read the header of the specified bitcode
- /// buffer and extract just the triple information. If successful,
- /// this returns a string and *does not* take ownership
- /// of 'buffer'. On error, this returns "", and fills in *ErrMsg
- /// if ErrMsg is non-null.
+ /// Read the header of the specified bitcode buffer and extract just the
+ /// triple information. If successful, this returns a string and *does not*
+ /// take ownership of 'buffer'. On error, this returns "".
std::string getBitcodeTargetTriple(MemoryBuffer *Buffer,
- LLVMContext &Context,
- std::string *ErrMsg = nullptr);
+ LLVMContext &Context);
/// Read the specified bitcode file, returning the module.
/// This method *never* takes ownership of Buffer.
Modified: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp?rev=212340&r1=212339&r2=212340&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp (original)
+++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp Fri Jul 4 08:30:13 2014
@@ -3468,14 +3468,11 @@ ErrorOr<Module *> llvm::parseBitcodeFile
}
std::string llvm::getBitcodeTargetTriple(MemoryBuffer *Buffer,
- LLVMContext& Context,
- std::string *ErrMsg) {
+ LLVMContext &Context) {
BitcodeReader *R = new BitcodeReader(Buffer, Context);
std::string Triple("");
- if (std::error_code EC = R->ParseTriple(Triple))
- if (ErrMsg)
- *ErrMsg = EC.message();
+ R->ParseTriple(Triple);
R->releaseBuffer();
delete R;
More information about the llvm-commits
mailing list