diff options
author | Aaron Smith <aaron.smith@microsoft.com> | 2018-03-26 22:13:22 +0000 |
---|---|---|
committer | Aaron Smith <aaron.smith@microsoft.com> | 2018-03-26 22:13:22 +0000 |
commit | ed81a9db297f5079cee41c7b91187e86b2e1b730 (patch) | |
tree | a64c716bb0b87aaeb23debdda6164211618a92b8 /llvm/lib/DebugInfo/PDB/DIA | |
parent | 53708a5e9e60bfc5e7dc9c1135262d50f39454b4 (diff) | |
download | bcm5719-llvm-ed81a9db297f5079cee41c7b91187e86b2e1b730.tar.gz bcm5719-llvm-ed81a9db297f5079cee41c7b91187e86b2e1b730.zip |
[DebugInfoPDB] Add DIA implementation of findLineNumbersByRVA
This method is used to find line numbers for PDBSymbolData
that have an invalid virtual address.
llvm-svn: 328586
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/DIA')
-rw-r--r-- | llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp b/llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp index 16d28b6a434..afbfdeab31b 100644 --- a/llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp +++ b/llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp @@ -245,6 +245,15 @@ DIASession::findLineNumbersByAddress(uint64_t Address, uint32_t Length) const { } std::unique_ptr<IPDBEnumLineNumbers> +DIASession::findLineNumbersByRVA(uint32_t RVA, uint32_t Length) const { + CComPtr<IDiaEnumLineNumbers> LineNumbers; + if (S_OK != Session->findLinesByRVA(RVA, Length, &LineNumbers)) + return nullptr; + + return llvm::make_unique<DIAEnumLineNumbers>(LineNumbers); +} + +std::unique_ptr<IPDBEnumLineNumbers> DIASession::findLineNumbersBySectOffset(uint32_t Section, uint32_t Offset, uint32_t Length) const { CComPtr<IDiaEnumLineNumbers> LineNumbers; |