<commit_before>//===------- OrcRemoteTargetRPCAPI.cpp - ORC Remote API utilities ---------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#include "llvm/ExecutionEngine/Orc/OrcRemoteTargetRPCAPI.h"

namespace llvm {
namespace orc {
namespace remote {

const char *OrcRemoteTargetRPCAPI::getJITProcIdName(JITProcId Id) {
  switch (Id) {
  case InvalidId:
    return "*** Invalid JITProcId ***";
  case CallIntVoidId:
    return "CallIntVoid";
  case CallIntVoidResponseId:
    return "CallIntVoidResponse";
  case CallMainId:
    return "CallMain";
  case CallMainResponseId:
    return "CallMainResponse";
  case CallVoidVoidId:
    return "CallVoidVoid";
  case CallVoidVoidResponseId:
    return "CallVoidVoidResponse";
  case CreateRemoteAllocatorId:
    return "CreateRemoteAllocator";
  case CreateIndirectStubsOwnerId:
    return "CreateIndirectStubsOwner";
  case DeregisterEHFramesId:
    return "DeregisterEHFrames";
  case DestroyRemoteAllocatorId:
    return "DestroyRemoteAllocator";
  case DestroyIndirectStubsOwnerId:
    return "DestroyIndirectStubsOwner";
  case EmitIndirectStubsId:
    return "EmitIndirectStubs";
  case EmitIndirectStubsResponseId:
    return "EmitIndirectStubsResponse";
  case EmitResolverBlockId:
    return "EmitResolverBlock";
  case EmitTrampolineBlockId:
    return "EmitTrampolineBlock";
  case EmitTrampolineBlockResponseId:
    return "EmitTrampolineBlockResponse";
  case GetSymbolAddressId:
    return "GetSymbolAddress";
  case GetSymbolAddressResponseId:
    return "GetSymbolAddressResponse";
  case GetRemoteInfoId:
    return "GetRemoteInfo";
  case GetRemoteInfoResponseId:
    return "GetRemoteInfoResponse";
  case ReadMemId:
    return "ReadMem";
  case ReadMemResponseId:
    return "ReadMemResponse";
  case RegisterEHFramesId:
    return "RegisterEHFrames";
  case ReserveMemId:
    return "ReserveMem";
  case ReserveMemResponseId:
    return "ReserveMemResponse";
  case RequestCompileId:
    return "RequestCompile";
  case RequestCompileResponseId:
    return "RequestCompileResponse";
  case SetProtectionsId:
    return "SetProtections";
  case TerminateSessionId:
    return "TerminateSession";
  case WriteMemId:
    return "WriteMem";
  case WritePtrId:
    return "WritePtr";
  };
  return nullptr;
}
}
}
}
<commit_msg>[Orc] Replace switch cases with a macro.<commit_after>//===------- OrcRemoteTargetRPCAPI.cpp - ORC Remote API utilities ---------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#include "llvm/ExecutionEngine/Orc/OrcRemoteTargetRPCAPI.h"

#define PROCNAME(X) \
  case X ## Id: \
  return #X

namespace llvm {
namespace orc {
namespace remote {

const char *OrcRemoteTargetRPCAPI::getJITProcIdName(JITProcId Id) {
  switch (Id) {
  case InvalidId:
    return "*** Invalid JITProcId ***";
  PROCNAME(CallIntVoid);
  PROCNAME(CallIntVoidResponse);
  PROCNAME(CallMain);
  PROCNAME(CallMainResponse);
  PROCNAME(CallVoidVoid);
  PROCNAME(CallVoidVoidResponse);
  PROCNAME(CreateRemoteAllocator);
  PROCNAME(CreateIndirectStubsOwner);
  PROCNAME(DeregisterEHFrames);
  PROCNAME(DestroyRemoteAllocator);
  PROCNAME(DestroyIndirectStubsOwner);
  PROCNAME(EmitIndirectStubs);
  PROCNAME(EmitIndirectStubsResponse);
  PROCNAME(EmitResolverBlock);
  PROCNAME(EmitTrampolineBlock);
  PROCNAME(EmitTrampolineBlockResponse);
  PROCNAME(GetSymbolAddress);
  PROCNAME(GetSymbolAddressResponse);
  PROCNAME(GetRemoteInfo);
  PROCNAME(GetRemoteInfoResponse);
  PROCNAME(ReadMem);
  PROCNAME(ReadMemResponse);
  PROCNAME(RegisterEHFrames);
  PROCNAME(ReserveMem);
  PROCNAME(ReserveMemResponse);
  PROCNAME(RequestCompile);
  PROCNAME(RequestCompileResponse);
  PROCNAME(SetProtections);
  PROCNAME(TerminateSession);
  PROCNAME(WriteMem);
  PROCNAME(WritePtr);
  };
  return nullptr;
}
}
}
}

{'fraction_non_alphanumeric': 0.13163532492263746, 'fraction_numerical': 0.0, 'mean_word_length': 3.863425925925926, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3948183', 'n_tokens_mistral': 1288, 'n_tokens_neox': 1248, 'n_words': 262}