From: Keith Wyss Date: Fri, 13 Oct 2017 00:06:35 +0000 (+0000) Subject: Removing default case statement from covered switch. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4d725c63e3ffc51ec283e35298afa2bd14c34eec;p=llvm Removing default case statement from covered switch. Previous patch did not count on the llvm command line parser to restrict the inputs, but it is safe to do so. Fix forward for patch with details: -- https://reviews.llvm.org/D38650 and -- https://llvm.org/svn/llvm-project/llvm/trunk@315635 91177308-0d34-0410-b5e6-96231b3b80d8 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315644 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/llvm-xray/xray-stacks.cc b/tools/llvm-xray/xray-stacks.cc index be3d9d5f6a6..fd5df82e093 100644 --- a/tools/llvm-xray/xray-stacks.cc +++ b/tools/llvm-xray/xray-stacks.cc @@ -798,10 +798,6 @@ static CommandRegistration Unused(&Stack, []() -> Error { ST.printAllAggregatingThreads( outs(), FuncIdHelper, StacksOutputFormat); break; - default: - return make_error( - "Illegal value for aggregation-type.", - make_error_code(errc::result_out_of_range)); } } else { switch (RequestedAggregation) { @@ -813,10 +809,6 @@ static CommandRegistration Unused(&Stack, []() -> Error { ST.printAllPerThread( outs(), FuncIdHelper, StacksOutputFormat); break; - default: - return make_error( - "Illegal value for aggregation-type.", - make_error_code(errc::result_out_of_range)); } } return Error::success();