[cfe-commits] r105841 - in /cfe/trunk: include/clang/Driver/ArgList.h lib/Driver/ArgList.cpp
Daniel Dunbar
daniel at zuster.org
Fri Jun 11 15:00:22 PDT 2010
Author: ddunbar
Date: Fri Jun 11 17:00:22 2010
New Revision: 105841
URL: http://llvm.org/viewvc/llvm-project?rev=105841&view=rev
Log:
Driver: Get rid of the proxy support in DerivedArgList.
Modified:
cfe/trunk/include/clang/Driver/ArgList.h
cfe/trunk/lib/Driver/ArgList.cpp
Modified: cfe/trunk/include/clang/Driver/ArgList.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/ArgList.h?rev=105841&r1=105840&r2=105841&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/ArgList.h (original)
+++ cfe/trunk/include/clang/Driver/ArgList.h Fri Jun 11 17:00:22 2010
@@ -104,11 +104,11 @@
typedef arglist_type::const_reverse_iterator const_reverse_iterator;
private:
- /// The full list of arguments.
- arglist_type &Args;
+ /// The internal list of arguments.
+ arglist_type Args;
protected:
- ArgList(arglist_type &Args);
+ ArgList();
public:
virtual ~ArgList();
@@ -267,9 +267,6 @@
void operator=(const ArgList &); // DO NOT IMPLEMENT
private:
- /// The internal list of arguments.
- arglist_type ActualArgs;
-
/// List of argument strings used by the contained Args.
///
/// This is mutable since we treat the ArgList as being the list
@@ -317,15 +314,9 @@
class DerivedArgList : public ArgList {
InputArgList &BaseArgs;
- /// The internal list of arguments.
- arglist_type ActualArgs;
-
/// The list of arguments we synthesized.
mutable arglist_type SynthesizedArgs;
- /// Is this only a proxy for the base ArgList?
- bool OnlyProxy;
-
public:
/// Construct a new derived arg list from \arg BaseArgs.
///
Modified: cfe/trunk/lib/Driver/ArgList.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ArgList.cpp?rev=105841&r1=105840&r2=105841&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ArgList.cpp (original)
+++ cfe/trunk/lib/Driver/ArgList.cpp Fri Jun 11 17:00:22 2010
@@ -36,7 +36,7 @@
//
-ArgList::ArgList(arglist_type &_Args) : Args(_Args) {
+ArgList::ArgList() {
}
ArgList::~ArgList() {
@@ -205,7 +205,7 @@
//
InputArgList::InputArgList(const char **ArgBegin, const char **ArgEnd)
- : ArgList(ActualArgs), NumInputArgStrings(ArgEnd - ArgBegin) {
+ : NumInputArgStrings(ArgEnd - ArgBegin) {
ArgStrings.append(ArgBegin, ArgEnd);
}
@@ -240,9 +240,10 @@
//
-DerivedArgList::DerivedArgList(InputArgList &_BaseArgs, bool _OnlyProxy)
- : ArgList(_OnlyProxy ? _BaseArgs.getArgs() : ActualArgs),
- BaseArgs(_BaseArgs), OnlyProxy(_OnlyProxy) {
+DerivedArgList::DerivedArgList(InputArgList &_BaseArgs, bool OnlyProxy)
+ : BaseArgs(_BaseArgs) {
+ if (OnlyProxy)
+ getArgs() = _BaseArgs.getArgs();
}
DerivedArgList::~DerivedArgList() {
More information about the cfe-commits
mailing list