OSDN Git Service

Make IPDBSession::getGlobalScope a non-const method
authorAdrian McCarthy <amccarth@google.com>
Thu, 22 Jun 2017 18:42:23 +0000 (18:42 +0000)
committerAdrian McCarthy <amccarth@google.com>
Thu, 22 Jun 2017 18:42:23 +0000 (18:42 +0000)
commitb841963b254e38f199316604e9afbf74094c65c3
tree05ffb56b7f7382a8a7b844a2cb474191bf279996
parentdc0e67d2a5ed458e10c0a79348fbf66c4f5718e6
Make IPDBSession::getGlobalScope a non-const method

There doesn't seem to be a compelling reason why this method should be const
other than it was possible with the DIA implementation.  The native session
is going to act as a symbol factory and cache.  This could be acheived with
mutable (and the existing const_cast), but it seems cleaner to accept that
this method affects the state of the session.

This change eliminates an existing const_cast.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306041 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/DebugInfo/PDB/DIA/DIASession.h
include/llvm/DebugInfo/PDB/IPDBSession.h
include/llvm/DebugInfo/PDB/Native/NativeSession.h
lib/DebugInfo/PDB/DIA/DIASession.cpp
lib/DebugInfo/PDB/Native/NativeSession.cpp
unittests/DebugInfo/PDB/PDBApiTest.cpp