[llvm] r314270 - [XRay] fix the -Werror build by handling all enum cases in switches

Martin Pelikan via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 26 22:10:31 PDT 2017


Author: pelikan
Date: Tue Sep 26 22:10:31 2017
New Revision: 314270

URL: http://llvm.org/viewvc/llvm-project?rev=314270&view=rev
Log:
[XRay] fix the -Werror build by handling all enum cases in switches

Followup to D32840.

Modified:
    llvm/trunk/tools/llvm-xray/xray-account.cc
    llvm/trunk/tools/llvm-xray/xray-stacks.cc

Modified: llvm/trunk/tools/llvm-xray/xray-account.cc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-xray/xray-account.cc?rev=314270&r1=314269&r2=314270&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-xray/xray-account.cc (original)
+++ llvm/trunk/tools/llvm-xray/xray-account.cc Tue Sep 26 22:10:31 2017
@@ -418,6 +418,9 @@ template <> struct format_provider<llvm:
       case RecordTypes::ENTER:
         Stream << "enter";
         break;
+      case RecordTypes::ENTER_ARG:
+        Stream << "enter-arg";
+        break;
       case RecordTypes::EXIT:
         Stream << "exit";
         break;

Modified: llvm/trunk/tools/llvm-xray/xray-stacks.cc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-xray/xray-stacks.cc?rev=314270&r1=314269&r2=314270&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-xray/xray-stacks.cc (original)
+++ llvm/trunk/tools/llvm-xray/xray-stacks.cc Tue Sep 26 22:10:31 2017
@@ -321,7 +321,8 @@ public:
                                     AccountRecordState *state) {
     auto &TS = ThreadStackMap[R.TId];
     switch (R.Type) {
-    case RecordTypes::ENTER: {
+    case RecordTypes::ENTER:
+    case RecordTypes::ENTER_ARG: {
       state->wasLastRecordExit = false;
       // When we encounter a new function entry, we want to record the TSC for
       // that entry, and the function id. Before doing so we check the top of




More information about the llvm-commits mailing list