10 #ifndef LLVM_SUPPORT_TYPENAME_H 11 #define LLVM_SUPPORT_TYPENAME_H 27 template <
typename DesiredTypeName>
29 #if defined(__clang__) || defined(__GNUC__) 34 assert(!Name.
empty() &&
"Unable to find the template parameter!");
37 assert(Name.endswith(
"]") &&
"Name doesn't end in the substitution key!");
38 return Name.drop_back(1);
39 #elif defined(_MSC_VER) 44 assert(!Name.
empty() &&
"Unable to find the function name!");
48 if (Name.startswith(
Prefix)) {
53 auto AnglePos = Name.
rfind(
'>');
55 return Name.substr(0, AnglePos);
59 return "UNKNOWN_TYPE";
This class represents lattice values for constants.
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 LLVM_ATTRIBUTE_ALWAYS_INLINE size_t size() const
size - Get the string size.
amdgpu Simplify well known AMD library false Value Value const Twine & Name
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool empty() const
empty - Check if the string is empty.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE StringRef substr(size_t Start, size_t N=npos) const
Return a reference to the substring from [Start, Start + N).
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE StringRef drop_front(size_t N=1) const
Return a StringRef equal to 'this' but with the first N elements dropped.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
StringRef - Represent a constant reference to a string, i.e.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE size_t find(char C, size_t From=0) const
Search for the first character C in the string.