Skip to content

Commit 2ffa912

Browse files
committed
Change goto-cc function-local to file-local
goto-cc had a misleading flag called `--export-function-local-symbols`. This flag exported the declarations of all static functions in a file, and is thus more appropriately named `--export-file-local-symbols`. That was actually the flag's old name, and indeed those functions' mangled name would be prefixed with `__CPROVER_file_local`. Some of the documentation also referred to the flag's old name. This commit makes the documentation and flags consistent with the internal implementation, i.e. the flag is now called `--export-file-local-symbols`. The `function` flag is still accepted because some existing code in the wild relies on this, but goto-cc emits a warning if the user passes that flag.
1 parent 660d556 commit 2ffa912

File tree

6 files changed

+8496
-8
lines changed

6 files changed

+8496
-8
lines changed

doc/architectural/static-functions.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ For performance reasons, it might be desirable to analyze the API
5959
function independently of the static function. We can analyze the API
6060
function by "stubbing out" the static function, replacing it with a
6161
function that does nothing apart from asserting that its inputs satisfy
62-
the function's contract. Add the following to `harness.c`:
62+
the function's contract. ("Stubbing out" a function is sometimes known
63+
as "modelling" or "abstracting it out".) Add the following to
64+
`harness.c`:
6365

6466
\code{.c}
6567
static void private_function(const int *a, int *b)

regression/goto-cc-file-local/chain.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ for src in ${SRC}; do
6363

6464
if [[ "${is_windows}" == "true" ]]; then
6565
"${goto_cc}" \
66-
--export-function-local-symbols \
66+
--export-file-local-symbols \
6767
--verbosity 10 \
6868
${wall} \
6969
${suffix} \
@@ -72,7 +72,7 @@ for src in ${SRC}; do
7272

7373
else
7474
"${goto_cc}" \
75-
--export-function-local-symbols \
75+
--export-file-local-symbols \
7676
--verbosity 10 \
7777
${wall} \
7878
${suffix} \
@@ -86,7 +86,7 @@ if is_in final-link "$ALL_ARGS"; then
8686
rm -f ${OUT_FILE}
8787
if [[ "${is_windows}" == "true" ]]; then
8888
"${goto_cc}" \
89-
--export-function-local-symbols \
89+
--export-file-local-symbols \
9090
--verbosity 10 \
9191
${wall} \
9292
${suffix} \
@@ -95,7 +95,7 @@ if is_in final-link "$ALL_ARGS"; then
9595

9696
else
9797
"${goto_cc}" \
98-
--export-function-local-symbols \
98+
--export-file-local-symbols \
9999
--verbosity 10 \
100100
${wall} \
101101
${suffix} \

0 commit comments

Comments
 (0)