Use ErrorOr for the ::create factory on instrumented and sample profilers.
authorDiego Novillo <dnovillo@google.com>
Mon, 3 Nov 2014 00:51:45 +0000 (00:51 +0000)
committerDiego Novillo <dnovillo@google.com>
Mon, 3 Nov 2014 00:51:45 +0000 (00:51 +0000)
commit2b6bd7aaf5a86d9f67cba740afd818aae4647fa7
treeb0e91f8d3487dc2d2cebdb25b5e943374b6a4d4d
parentb6c9c729dd3140a848dde8b63484d2584b453ae4
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
include/llvm/ProfileData/InstrProfReader.h
include/llvm/ProfileData/SampleProfReader.h
include/llvm/ProfileData/SampleProfWriter.h
lib/ProfileData/InstrProfReader.cpp
lib/ProfileData/SampleProfReader.cpp
lib/ProfileData/SampleProfWriter.cpp
lib/Transforms/Scalar/SampleProfile.cpp
tools/llvm-profdata/llvm-profdata.cpp