Add ability to update existing variables with values read from the command line

to certain classes.  This is nice because it means that in header files we can
just declare a value, and still have that value be set based on a command-line
argument.  The difference is now that the #include of CommandLine.h does not
need to go into the header file as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2708 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2002-05-22 17:03:05 +00:00
parent 7f9412b50d
commit 71fb71628a
4 changed files with 98 additions and 20 deletions

View File

@ -346,7 +346,7 @@ bool EnumValueBase::handleOccurance(const char *ArgName, const string &Arg) {
return error(": unrecognized alternative '" + Arg +
"'! Alternatives are: " + Alternatives);
}
Value = ValueMap[i].second.first;
setValue(ValueMap[i].second.first);
return false;
}