Provide better support for pointer-valued command line arguments

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14746 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-07-11 03:18:30 +00:00
parent d36c970a11
commit 6a4dd24a99
2 changed files with 6 additions and 0 deletions

View File

@ -711,6 +711,9 @@ struct opt_storage<DataType, false, false> {
void setValue(const T &V) { Value = V; }
DataType &getValue() { return Value; }
DataType getValue() const { return Value; }
// If the datatype is a pointer, support -> on it.
DataType operator->() const { return Value; }
};

View File

@ -711,6 +711,9 @@ struct opt_storage<DataType, false, false> {
void setValue(const T &V) { Value = V; }
DataType &getValue() { return Value; }
DataType getValue() const { return Value; }
// If the datatype is a pointer, support -> on it.
DataType operator->() const { return Value; }
};