From: Chris Lattner Date: Sun, 11 Jul 2004 03:18:30 +0000 (+0000) Subject: Provide better support for pointer-valued command line arguments X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6a4dd24a995072c9c6f1ae45f19f94010d8389fb;p=oota-llvm.git 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 --- diff --git a/include/Support/CommandLine.h b/include/Support/CommandLine.h index 0d1d14813cd..b7bd62a3807 100644 --- a/include/Support/CommandLine.h +++ b/include/Support/CommandLine.h @@ -711,6 +711,9 @@ struct opt_storage { 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; } }; diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h index 0d1d14813cd..b7bd62a3807 100644 --- a/include/llvm/Support/CommandLine.h +++ b/include/llvm/Support/CommandLine.h @@ -711,6 +711,9 @@ struct opt_storage { 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; } };