Changeset View
Changeset View
Standalone View
Standalone View
libcxxabi/src/cxa_demangle.cpp
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | if (*first == '_') { | ||||
; | ; | ||||
if (t1 == last) | if (t1 == last) | ||||
first = last; | first = last; | ||||
} | } | ||||
} | } | ||||
return first; | return first; | ||||
} | } | ||||
bool itanium_demangle::Node::equals(Node const* Other) const { | |||||
assert(Other != nullptr); | |||||
if (K != Other->getKind()) | |||||
return false; | |||||
switch (K) { | |||||
#define NODE(X) \ | |||||
case K##X: \ | |||||
return *static_cast<const X*>(this) == *static_cast<const X*>(Other); | |||||
#include "demangle/ItaniumNodes.def" | |||||
} | |||||
assert(0 && "unknown mangling node kind"); | |||||
} | |||||
#ifndef NDEBUG | #ifndef NDEBUG | ||||
namespace { | namespace { | ||||
struct DumpVisitor { | struct DumpVisitor { | ||||
unsigned Depth = 0; | unsigned Depth = 0; | ||||
bool PendingNewline = false; | bool PendingNewline = false; | ||||
template<typename NodeT> static constexpr bool wantsNewline(const NodeT *) { | template<typename NodeT> static constexpr bool wantsNewline(const NodeT *) { | ||||
return true; | return true; | ||||
▲ Show 20 Lines • Show All 343 Lines • Show Last 20 Lines |