summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-doc/BitcodeReader.h
diff options
context:
space:
mode:
authorJulie Hockett <juliehockett@google.com>2018-08-13 21:51:48 +0000
committerJulie Hockett <juliehockett@google.com>2018-08-13 21:51:48 +0000
commit39f47b92867d1be9c8e0464b2b5bee16511d6120 (patch)
tree5a02f43de65e3d48b331d85134035a2f74b0e006 /clang-tools-extra/clang-doc/BitcodeReader.h
parent93f7e7f03e28e80f25cdce02fbd15fb3394983e6 (diff)
downloadbcm5719-llvm-39f47b92867d1be9c8e0464b2b5bee16511d6120.tar.gz
bcm5719-llvm-39f47b92867d1be9c8e0464b2b5bee16511d6120.zip
Revert "[clang-doc] Updating BitcodeReader to use llvm::Error"
This reverts commit r339617 for breaking bots. llvm-svn: 339620
Diffstat (limited to 'clang-tools-extra/clang-doc/BitcodeReader.h')
-rw-r--r--clang-tools-extra/clang-doc/BitcodeReader.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/clang-tools-extra/clang-doc/BitcodeReader.h b/clang-tools-extra/clang-doc/BitcodeReader.h
index ec3f6b0fd0e..aaf25257c85 100644
--- a/clang-tools-extra/clang-doc/BitcodeReader.h
+++ b/clang-tools-extra/clang-doc/BitcodeReader.h
@@ -22,7 +22,6 @@
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Bitcode/BitstreamReader.h"
-#include "llvm/Support/Error.h"
namespace clang {
namespace doc {
@@ -39,31 +38,30 @@ private:
enum class Cursor { BadBlock = 1, Record, BlockEnd, BlockBegin };
// Top level parsing
- llvm::Error validateStream();
- llvm::Error readVersion();
- llvm::Error readBlockInfoBlock();
+ bool validateStream();
+ bool readVersion();
+ bool readBlockInfoBlock();
// Read a block of records into a single Info struct, calls readRecord on each
// record found.
- template <typename T> llvm::Error readBlock(unsigned ID, T I);
+ template <typename T> bool readBlock(unsigned ID, T I);
// Step through a block of records to find the next data field.
- template <typename T> llvm::Error readSubBlock(unsigned ID, T I);
+ template <typename T> bool readSubBlock(unsigned ID, T I);
// Read record data into the given Info data field, calling the appropriate
// parseRecord functions to parse and store the data.
- template <typename T> llvm::Error readRecord(unsigned ID, T I);
+ template <typename T> bool readRecord(unsigned ID, T I);
// Allocate the relevant type of info and add read data to the object.
- template <typename T>
- llvm::Expected<std::unique_ptr<Info>> createInfo(unsigned ID);
+ template <typename T> std::unique_ptr<Info> createInfo(unsigned ID);
// Helper function to step through blocks to find and dispatch the next record
// or block to be read.
Cursor skipUntilRecordOrBlock(unsigned &BlockOrRecordID);
// Helper function to set up the approriate type of Info.
- llvm::Expected<std::unique_ptr<Info>> readBlockToInfo(unsigned ID);
+ std::unique_ptr<Info> readBlockToInfo(unsigned ID);
llvm::BitstreamCursor &Stream;
Optional<llvm::BitstreamBlockInfo> BlockInfo;
OpenPOWER on IntegriCloud