llvm.org GIT mirror llvm / 82a599a
Remove unused old-style error handling. If needed, an ErrorOr should be used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212340 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 6 years ago
2 changed file(s) with 6 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
4040 LLVMContext &Context,
4141 std::string *ErrMsg = nullptr);
4242
43 /// getBitcodeTargetTriple - Read the header of the specified bitcode
44 /// buffer and extract just the triple information. If successful,
45 /// this returns a string and *does not* take ownership
46 /// of 'buffer'. On error, this returns "", and fills in *ErrMsg
47 /// if ErrMsg is non-null.
43 /// Read the header of the specified bitcode buffer and extract just the
44 /// triple information. If successful, this returns a string and *does not*
45 /// take ownership of 'buffer'. On error, this returns "".
4846 std::string getBitcodeTargetTriple(MemoryBuffer *Buffer,
49 LLVMContext &Context,
50 std::string *ErrMsg = nullptr);
47 LLVMContext &Context);
5148
5249 /// Read the specified bitcode file, returning the module.
5350 /// This method *never* takes ownership of Buffer.
34673467 }
34683468
34693469 std::string llvm::getBitcodeTargetTriple(MemoryBuffer *Buffer,
3470 LLVMContext& Context,
3471 std::string *ErrMsg) {
3470 LLVMContext &Context) {
34723471 BitcodeReader *R = new BitcodeReader(Buffer, Context);
34733472
34743473 std::string Triple("");
3475 if (std::error_code EC = R->ParseTriple(Triple))
3476 if (ErrMsg)
3477 *ErrMsg = EC.message();
3474 R->ParseTriple(Triple);
34783475
34793476 R->releaseBuffer();
34803477 delete R;