LLDB  mainline
MSVCUndecoratedNameParser.h
Go to the documentation of this file.
1 //===-- MSVCUndecoratedNameParser.h -----------------------------*- C++ -*-===//
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 #ifndef LLDB_SOURCE_PLUGINS_LANGUAGE_CPLUSPLUS_MSVCUNDECORATEDNAMEPARSER_H
10 #define LLDB_SOURCE_PLUGINS_LANGUAGE_CPLUSPLUS_MSVCUNDECORATEDNAMEPARSER_H
11 
12 #include <vector>
13 
14 #include "llvm/ADT/ArrayRef.h"
15 #include "llvm/ADT/StringRef.h"
16 
18 public:
19  MSVCUndecoratedNameSpecifier(llvm::StringRef full_name,
20  llvm::StringRef base_name)
21  : m_full_name(full_name), m_base_name(base_name) {}
22 
23  llvm::StringRef GetFullName() const { return m_full_name; }
24  llvm::StringRef GetBaseName() const { return m_base_name; }
25 
26 private:
27  llvm::StringRef m_full_name;
28  llvm::StringRef m_base_name;
29 };
30 
32 public:
33  explicit MSVCUndecoratedNameParser(llvm::StringRef name);
34 
35  llvm::ArrayRef<MSVCUndecoratedNameSpecifier> GetSpecifiers() const {
36  return m_specifiers;
37  }
38 
39  static bool IsMSVCUndecoratedName(llvm::StringRef name);
40  static bool ExtractContextAndIdentifier(llvm::StringRef name,
41  llvm::StringRef &context,
42  llvm::StringRef &identifier);
43 
44  static llvm::StringRef DropScope(llvm::StringRef name);
45 
46 private:
47  std::vector<MSVCUndecoratedNameSpecifier> m_specifiers;
48 };
49 
50 #endif
MSVCUndecoratedNameParser
Definition: MSVCUndecoratedNameParser.h:31
MSVCUndecoratedNameParser::GetSpecifiers
llvm::ArrayRef< MSVCUndecoratedNameSpecifier > GetSpecifiers() const
Definition: MSVCUndecoratedNameParser.h:35
MSVCUndecoratedNameSpecifier::MSVCUndecoratedNameSpecifier
MSVCUndecoratedNameSpecifier(llvm::StringRef full_name, llvm::StringRef base_name)
Definition: MSVCUndecoratedNameParser.h:19
MSVCUndecoratedNameParser::MSVCUndecoratedNameParser
MSVCUndecoratedNameParser(llvm::StringRef name)
Definition: MSVCUndecoratedNameParser.cpp:13
MSVCUndecoratedNameParser::DropScope
static llvm::StringRef DropScope(llvm::StringRef name)
Definition: MSVCUndecoratedNameParser.cpp:91
MSVCUndecoratedNameSpecifier::m_full_name
llvm::StringRef m_full_name
Definition: MSVCUndecoratedNameParser.h:27
MSVCUndecoratedNameSpecifier::GetFullName
llvm::StringRef GetFullName() const
Definition: MSVCUndecoratedNameParser.h:23
MSVCUndecoratedNameSpecifier::m_base_name
llvm::StringRef m_base_name
Definition: MSVCUndecoratedNameParser.h:28
MSVCUndecoratedNameParser::ExtractContextAndIdentifier
static bool ExtractContextAndIdentifier(llvm::StringRef name, llvm::StringRef &context, llvm::StringRef &identifier)
Definition: MSVCUndecoratedNameParser.cpp:78
MSVCUndecoratedNameSpecifier::GetBaseName
llvm::StringRef GetBaseName() const
Definition: MSVCUndecoratedNameParser.h:24
MSVCUndecoratedNameParser::IsMSVCUndecoratedName
static bool IsMSVCUndecoratedName(llvm::StringRef name)
Definition: MSVCUndecoratedNameParser.cpp:74
MSVCUndecoratedNameSpecifier
Definition: MSVCUndecoratedNameParser.h:17
MSVCUndecoratedNameParser::m_specifiers
std::vector< MSVCUndecoratedNameSpecifier > m_specifiers
Definition: MSVCUndecoratedNameParser.h:47