20 #include <unordered_set> 32 FunctionArgEnumerator(
const IPDBSession &PDBSession,
34 : Session(PDBSession),
Func(PDBFunc) {
37 std::unordered_set<std::string> SeenNames;
39 while (
auto Child = DataChildren->getNext()) {
42 if (SeenNames.find(Name) != SeenNames.end())
44 Args.push_back(std::move(Child));
45 SeenNames.insert(Name);
51 uint32_t getChildCount()
const override {
return Args.size(); }
53 std::unique_ptr<PDBSymbolData>
55 if (Index >=
Args.size())
62 std::unique_ptr<PDBSymbolData> getNext()
override {
63 if (CurIter ==
Args.end())
65 const auto &
Result = **CurIter;
70 void reset()
override { CurIter =
Args.empty() ?
Args.end() :
Args.begin(); }
73 typedef std::vector<std::unique_ptr<PDBSymbolData>> ArgListType;
77 ArgListType::const_iterator CurIter;
81 std::unique_ptr<IPDBEnumChildren<PDBSymbolData>>
83 return llvm::make_unique<FunctionArgEnumerator>(Session, *
this);
94 if (Name ==
"__vecDelDtor")
99 std::unique_ptr<IPDBEnumLineNumbers> PDBSymbolFunc::getLineNumbers()
const {
100 auto Len = RawSymbol->getLength();
101 return Session.findLineNumbersByAddress(RawSymbol->getVirtualAddress(),
106 if (
auto Lines = getLineNumbers()) {
107 if (
auto FirstLine = Lines->getNext()) {
108 return FirstLine->getCompilandId();
IPDBSession defines an interface used to provide a context for querying debug information from a debu...
This class represents lattice values for constants.
std::unique_ptr< IPDBEnumChildren< PDBSymbolData > > getArguments() const
amdgpu Simplify well known AMD library false Value Value const Twine & Name
static StringRef getName(Value *V)
bool isDestructor() const
virtual void dump(const PDBSymbolAnnotation &Symbol)
StringRef getName() const
Return a constant reference to the value's name.
FORWARD_CONCRETE_SYMBOL_ID_METHOD_WITH_NAME(PDBSymbolTypeFunctionSig, getType, getSignature) std uint32_t getCompilandId() const
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
void dump(PDBSymDumper &Dumper) const override
Dumps the contents of a symbol a raw_ostream.