summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-xray
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2016-11-11 04:28:40 +0000
committerMehdi Amini <mehdi.amini@apple.com>2016-11-11 04:28:40 +0000
commit41af43092ccc8030bb49cea324d85eecd5ae68a8 (patch)
treef30038673dd27f2d4785068fffd510abe4fb23d7 /llvm/tools/llvm-xray
parente8e98dcb74cd6d297c31c023bfacdf7f28cdaabc (diff)
downloadbcm5719-llvm-41af43092ccc8030bb49cea324d85eecd5ae68a8.tar.gz
bcm5719-llvm-41af43092ccc8030bb49cea324d85eecd5ae68a8.zip
Make the Error class constructor protected
This is forcing to use Error::success(), which is in a wide majority of cases a lot more readable. Differential Revision: https://reviews.llvm.org/D26481 llvm-svn: 286561
Diffstat (limited to 'llvm/tools/llvm-xray')
-rw-r--r--llvm/tools/llvm-xray/xray-extract.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/tools/llvm-xray/xray-extract.cc b/llvm/tools/llvm-xray/xray-extract.cc
index 4fbe5ec3565..e51b64c8ad6 100644
--- a/llvm/tools/llvm-xray/xray-extract.cc
+++ b/llvm/tools/llvm-xray/xray-extract.cc
@@ -223,8 +223,8 @@ void InstrumentationMapExtractor::exportAsYAML(raw_ostream &OS) {
Out << YAMLSleds;
}
-static CommandRegistration Unused(&Extract, [] {
- Error Err;
+static CommandRegistration Unused(&Extract, []() -> Error {
+ Error Err = Error::success();
xray::InstrumentationMapExtractor Extractor(
ExtractInput, InstrumentationMapExtractor::InputFormats::ELF, Err);
if (Err)
OpenPOWER on IntegriCloud