variable_watch: Remove undocumented and redundant access type
The ALLOWED_UNKNOWN_VARIABLE_READ_ACCESS access type was switched on an undocumented variable and its lookup caused an unnecessary performance impact. Remove it.
This commit is contained in:
parent
96e9eb1766
commit
d849800351
|
@ -0,0 +1,8 @@
|
|||
variable_watch-no-allowed-access
|
||||
--------------------------------
|
||||
|
||||
* Callbacks established by the :command:`variable_watch` command will no
|
||||
longer receive the ``ALLOWED_UNKNOWN_READ_ACCESS`` access type when
|
||||
the undocumented ``CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS`` variable is
|
||||
set. Uninitialized variable accesses will always be reported as
|
||||
``UNKNOWN_READ_ACCESS``.
|
|
@ -2470,23 +2470,12 @@ const char* cmMakefile::GetDefinition(const std::string& name) const
|
|||
vv->VariableAccessed(name, cmVariableWatch::VARIABLE_READ_ACCESS,
|
||||
def, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
// are unknown access allowed
|
||||
const char* allow = this->Internal->VarStack.top()
|
||||
.Get("CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS");
|
||||
if(cmSystemTools::IsOn(allow))
|
||||
{
|
||||
vv->VariableAccessed(name,
|
||||
cmVariableWatch::ALLOWED_UNKNOWN_VARIABLE_READ_ACCESS, def, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
vv->VariableAccessed(name,
|
||||
cmVariableWatch::UNKNOWN_VARIABLE_READ_ACCESS, def, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return def;
|
||||
}
|
||||
|
|
|
@ -16,7 +16,6 @@ static const char* const cmVariableWatchAccessStrings[] =
|
|||
"READ_ACCESS",
|
||||
"UNKNOWN_READ_ACCESS",
|
||||
"UNKNOWN_DEFINED_ACCESS",
|
||||
"ALLOWED_UNKNOWN_READ_ACCESS",
|
||||
"MODIFIED_ACCESS",
|
||||
"REMOVED_ACCESS",
|
||||
"NO_ACCESS"
|
||||
|
|
|
@ -53,7 +53,6 @@ public:
|
|||
VARIABLE_READ_ACCESS = 0,
|
||||
UNKNOWN_VARIABLE_READ_ACCESS,
|
||||
UNKNOWN_VARIABLE_DEFINED_ACCESS,
|
||||
ALLOWED_UNKNOWN_VARIABLE_READ_ACCESS,
|
||||
VARIABLE_MODIFIED_ACCESS,
|
||||
VARIABLE_REMOVED_ACCESS,
|
||||
NO_ACCESS
|
||||
|
|
Loading…
Reference in New Issue