Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1055)

Unified Diff: lib/Bitcode/NaCl/TestUtils/NaClBitcodeTextReader.cpp

Issue 1191393004: Make function readNaClRecordTextAndBuildBitcode public. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/llvm/Bitcode/NaCl/NaClBitcodeMungeUtils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/Bitcode/NaCl/TestUtils/NaClBitcodeTextReader.cpp
diff --git a/lib/Bitcode/NaCl/TestUtils/NaClBitcodeTextReader.cpp b/lib/Bitcode/NaCl/TestUtils/NaClBitcodeTextReader.cpp
index e38eba42a245656b6f819e127a8c665c0203f22a..36e9ceb36e9555235ed253f90d7b809f48db016e 100644
--- a/lib/Bitcode/NaCl/TestUtils/NaClBitcodeTextReader.cpp
+++ b/lib/Bitcode/NaCl/TestUtils/NaClBitcodeTextReader.cpp
@@ -225,14 +225,10 @@ std::error_code TextRecordParser::readRecord() {
}
}
-// Read textual bitcode records from Filename, and fill Buffer with
-// corresponding bitcode. Return error_code describing success of
-// read. Verbose (if not nullptr) is used to generate more human
-// readable error messages than the text in the returned error
-// message.
-static std::error_code ReadRecordTextAndBuildBitcode(
- StringRef Filename, SmallVectorImpl<char> &Buffer,
- raw_ostream *Verbose = nullptr) {
+} // end of anonymous namespace
+
+std::error_code llvm::readNaClRecordTextAndBuildBitcode(
+ StringRef Filename, SmallVectorImpl<char> &Buffer, raw_ostream *Verbose) {
// Open the input file with text records.
ErrorOr<std::unique_ptr<MemoryBuffer>>
MemBuf(MemoryBuffer::getFileOrSTDIN(Filename));
@@ -258,8 +254,6 @@ static std::error_code ReadRecordTextAndBuildBitcode(
return std::error_code();
}
-} // end of anonymous namespace
-
std::error_code llvm::readNaClTextBcRecordList(
NaClBitcodeRecordList &RecordList,
std::unique_ptr<MemoryBuffer> InputBuffer) {
@@ -274,7 +268,7 @@ llvm::parseNaClBitcodeText(const std::string &Filename, LLVMContext &Context,
// Fill Buffer with corresponding bitcode records from Filename.
if (std::error_code EC =
- ReadRecordTextAndBuildBitcode(Filename, Buffer, Verbose))
+ readNaClRecordTextAndBuildBitcode(Filename, Buffer, Verbose))
return EC;
// Parse buffer as ordinary binary bitcode file.
« no previous file with comments | « include/llvm/Bitcode/NaCl/NaClBitcodeMungeUtils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698