mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-27 14:24:40 +00:00
Use ErrorOr for the ::create factory on instrumented and sample profilers.
Summary: As discussed in http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20141027/242445.html, the creation of reader and writer instances is better done using ErrorOr. There are no functional changes, but several callers needed to be adjusted. Reviewers: bogner Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6076 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221120 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -18,6 +18,7 @@
|
||||
#include "llvm/ADT/ArrayRef.h"
|
||||
#include "llvm/ADT/StringExtras.h"
|
||||
#include "llvm/ProfileData/InstrProf.h"
|
||||
#include "llvm/Support/ErrorOr.h"
|
||||
#include "llvm/Support/LineIterator.h"
|
||||
#include "llvm/Support/MemoryBuffer.h"
|
||||
#include "llvm/Support/EndianStream.h"
|
||||
@ -94,8 +95,7 @@ public:
|
||||
|
||||
/// Factory method to create an appropriately typed reader for the given
|
||||
/// instrprof file.
|
||||
static std::error_code create(std::string Path,
|
||||
std::unique_ptr<InstrProfReader> &Result);
|
||||
static ErrorOr<std::unique_ptr<InstrProfReader>> create(std::string Path);
|
||||
};
|
||||
|
||||
/// Reader for the simple text based instrprof format.
|
||||
|
Reference in New Issue
Block a user