diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2019-03-14 17:19:01 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2019-03-14 17:19:01 +0200 |
commit | d1b3ad7b302d037c8154bab9c4810d499c0bf1e4 (patch) | |
tree | 8c6ce63cb0a71bc670c3c5d46c2c1a06366956ad /build2/variable.hxx | |
parent | 8d8d7784d5fe0dc3cd8d7fbd4196c2337d389fd1 (diff) |
Change variable::override list order, make doubly-linked
Diffstat (limited to 'build2/variable.hxx')
-rw-r--r-- | build2/variable.hxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/build2/variable.hxx b/build2/variable.hxx index 51e6eed..2bdfe30 100644 --- a/build2/variable.hxx +++ b/build2/variable.hxx @@ -149,10 +149,16 @@ namespace build2 // variable itself). // // If the variable is overridden on the command line, then override is the - // chain of the special override variables. Their names are derived from the - // main variable name as <name>.{__override,__prefix,__suffix} and they are - // not entered into the var_pool. The override variables only vary in their - // names and visibility. Their alias pointer is always NULL. + // linked list of the special override variables. Their names are derived + // from the main variable name as <name>.{__override,__prefix,__suffix} and + // they are not entered into the var_pool. The override variables only vary + // in their names and visibility. Their alias pointer is re-purposed to make + // the list doubly-linked with the first override's alias pointing to the + // last element (or itself). + // + // Note that the override list is in the reverse order of the overrides + // appearing on the command line, which is important when deciding whether + // and in what order they apply (see find_override() for details). // // Note also that we don't propagate the variable type to override variables // and we keep override values as untyped names. They get "typed" when they |