diff options
Diffstat (limited to 'llvm/lib/DebugInfo/PDB')
-rw-r--r-- | llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp b/llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp index ef47b92b4f2..ef9390cda31 100644 --- a/llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp +++ b/llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp @@ -151,7 +151,7 @@ void DIASession::setLoadAddress(uint64_t Address) { Session->put_loadAddress(Address); } -std::unique_ptr<PDBSymbolExe> DIASession::getGlobalScope() const { +std::unique_ptr<PDBSymbolExe> DIASession::getGlobalScope() { CComPtr<IDiaSymbol> GlobalScope; if (S_OK != Session->get_globalScope(&GlobalScope)) return nullptr; diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp index 7e6843bceb7..c59cf866d1c 100644 --- a/llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp @@ -70,12 +70,11 @@ uint64_t NativeSession::getLoadAddress() const { return 0; } void NativeSession::setLoadAddress(uint64_t Address) {} -std::unique_ptr<PDBSymbolExe> NativeSession::getGlobalScope() const { - auto RawSymbol = - llvm::make_unique<NativeExeSymbol>(const_cast<NativeSession &>(*this)); +std::unique_ptr<PDBSymbolExe> NativeSession::getGlobalScope() { + auto RawSymbol = llvm::make_unique<NativeExeSymbol>(*this); auto PdbSymbol(PDBSymbol::create(*this, std::move(RawSymbol))); std::unique_ptr<PDBSymbolExe> ExeSymbol( - static_cast<PDBSymbolExe *>(PdbSymbol.release())); + static_cast<PDBSymbolExe *>(PdbSymbol.release())); return ExeSymbol; } |