File tree Expand file tree Collapse file tree
include/phasar/PhasarLLVM
lib/PhasarLLVM/TypeHierarchy Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717#ifndef PHASAR_PHASARLLVM_CONTROLFLOW_RESOLVER_RESOLVER_H_
1818#define PHASAR_PHASARLLVM_CONTROLFLOW_RESOLVER_RESOLVER_H_
1919
20+ #include < optional>
2021#include < set>
2122#include < string>
2223
@@ -29,10 +30,6 @@ class Function;
2930class StructType ;
3031} // namespace llvm
3132
32- namespace std {
33- template <class T > class optional ;
34- }
35-
3633namespace psr {
3734class ProjectIRDB ;
3835class LLVMTypeHierarchy ;
Original file line number Diff line number Diff line change @@ -88,19 +88,16 @@ class LLVMTypeHierarchy
8888 using out_edge_iterator = boost::graph_traits<bidigraph_t >::out_edge_iterator;
8989 using in_edge_iterator = boost::graph_traits<bidigraph_t >::in_edge_iterator;
9090
91- static const std::string StructPrefix;
92-
93- static const std::string ClassPrefix;
94-
95- static const std::string VTablePrefix;
96-
97- static const std::string VTablePrefixDemang;
98-
99- static const std::string TypeInfoPrefix;
100-
101- static const std::string TypeInfoPrefixDemang;
102-
103- static const std::string PureVirtualCallName;
91+ static inline constexpr llvm::StringLiteral StructPrefix = " struct." ;
92+ static inline constexpr llvm::StringLiteral ClassPrefix = " class." ;
93+ static inline constexpr llvm::StringLiteral VTablePrefix = " _ZTV" ;
94+ static inline constexpr llvm::StringLiteral VTablePrefixDemang =
95+ " vtable for " ;
96+ static inline constexpr llvm::StringLiteral TypeInfoPrefix = " _ZTI" ;
97+ static inline constexpr llvm::StringLiteral TypeInfoPrefixDemang =
98+ " typeinfo for " ;
99+ static inline constexpr llvm::StringLiteral PureVirtualCallName =
100+ " __cxa_pure_virtual" ;
104101
105102private:
106103 bidigraph_t TypeGraph;
Original file line number Diff line number Diff line change @@ -49,20 +49,6 @@ using namespace std;
4949
5050namespace psr {
5151
52- const std::string LLVMTypeHierarchy::StructPrefix = " struct." ;
53-
54- const std::string LLVMTypeHierarchy::ClassPrefix = " class." ;
55-
56- const std::string LLVMTypeHierarchy::VTablePrefix = " _ZTV" ;
57-
58- const std::string LLVMTypeHierarchy::VTablePrefixDemang = " vtable for " ;
59-
60- const std::string LLVMTypeHierarchy::TypeInfoPrefix = " _ZTI" ;
61-
62- const std::string LLVMTypeHierarchy::TypeInfoPrefixDemang = " typeinfo for " ;
63-
64- const std::string LLVMTypeHierarchy::PureVirtualCallName = " __cxa_pure_virtual" ;
65-
6652LLVMTypeHierarchy::VertexProperties::VertexProperties (
6753 const llvm::StructType *Type)
6854 : Type(Type), ReachableTypes({Type}) {}
You can’t perform that action at this time.
0 commit comments