Coverage Report

Created: 2022-07-16 07:03

/Users/buildslave/jenkins/workspace/coverage/llvm-project/lldb/source/Plugins/ABI/X86/ABIX86_i386.cpp
Line
Count
Source
1
//===-- ABIX86_i386.cpp ---------------------------------------------------===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
9
#include "ABIX86_i386.h"
10
11
78
uint32_t ABIX86_i386::GetGenericNum(llvm::StringRef name) {
12
78
  return llvm::StringSwitch<uint32_t>(name)
13
78
      .Case("eip", LLDB_REGNUM_GENERIC_PC)
14
78
      .Case("esp", LLDB_REGNUM_GENERIC_SP)
15
78
      .Case("ebp", LLDB_REGNUM_GENERIC_FP)
16
78
      .Case("eflags", LLDB_REGNUM_GENERIC_FLAGS)
17
78
      .Case("edi", LLDB_REGNUM_GENERIC_ARG1)
18
78
      .Case("esi", LLDB_REGNUM_GENERIC_ARG2)
19
78
      .Case("edx", LLDB_REGNUM_GENERIC_ARG3)
20
78
      .Case("ecx", LLDB_REGNUM_GENERIC_ARG4)
21
78
      .Default(LLDB_INVALID_REGNUM);
22
78
}