9 #ifndef LLVM_SUPPORT_TYPENAME_H 10 #define LLVM_SUPPORT_TYPENAME_H 26 template <
typename DesiredTypeName>
28 #if defined(__clang__) || defined(__GNUC__) 33 assert(!Name.
empty() &&
"Unable to find the template parameter!");
36 assert(Name.endswith(
"]") &&
"Name doesn't end in the substitution key!");
37 return Name.drop_back(1);
38 #elif defined(_MSC_VER) 43 assert(!Name.
empty() &&
"Unable to find the function name!");
47 if (Name.startswith(
Prefix)) {
52 auto AnglePos = Name.
rfind(
'>');
54 return Name.substr(0, AnglePos);
58 return "UNKNOWN_TYPE";
This class represents lattice values for constants.
amdgpu Simplify well known AMD library false FunctionCallee Value const Twine & Name
LLVM_NODISCARD size_t rfind(char C, size_t From=npos) const
Search for the last character C in the string.
StringRef getTypeName()
We provide a function which tries to compute the (demangled) name of a type statically.
LLVM_NODISCARD StringRef drop_front(size_t N=1) const
Return a StringRef equal to 'this' but with the first N elements dropped.
LLVM_NODISCARD StringRef substr(size_t Start, size_t N=npos) const
Return a reference to the substring from [Start, Start + N).
LLVM_NODISCARD bool empty() const
empty - Check if the string is empty.
LLVM_NODISCARD size_t size() const
size - Get the string size.
LLVM_NODISCARD size_t find(char C, size_t From=0) const
Search for the first character C in the string.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
StringRef - Represent a constant reference to a string, i.e.