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)
commitfcd556074c03ab47fe809e1f94fc78a3b3fe94dd
tree0a20112f562c2a7dd6c9c11b0eebde6cedecd04c
parent4cd1d4ecb1a89d6201c24df5f48dd4c5366747fe
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

llvm-svn: 221120
llvm/include/llvm/ProfileData/InstrProfReader.h
llvm/include/llvm/ProfileData/SampleProfReader.h
llvm/include/llvm/ProfileData/SampleProfWriter.h
llvm/lib/ProfileData/InstrProfReader.cpp
llvm/lib/ProfileData/SampleProfReader.cpp
llvm/lib/ProfileData/SampleProfWriter.cpp
llvm/lib/Transforms/Scalar/SampleProfile.cpp
llvm/tools/llvm-profdata/llvm-profdata.cpp