Skip to content

Commit b7cf102

Browse files
author
Daniel Kroening
committed
add documentation to read_goto_binary and read_object_and_link
1 parent f611794 commit b7cf102

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

src/goto-programs/read_goto_binary.cpp

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ Module: Read Goto Programs
2727
#include "elf_reader.h"
2828
#include "osx_fat_reader.h"
2929

30+
/// \brief Read a goto binary from a file, but do not update \ref config
31+
/// \param filename the file name of the goto binary
32+
/// \param dest the goto model returned
33+
/// \param message_handler for diagnostics
34+
/// \deprecated Use read_goto_binary(file, message_handler) instead
35+
/// \return true on failure, false on success
3036
bool read_goto_binary(
3137
const std::string &filename,
3238
goto_modelt &dest,
@@ -36,6 +42,10 @@ bool read_goto_binary(
3642
filename, dest.symbol_table, dest.goto_functions, message_handler);
3743
}
3844

45+
/// \brief Read a goto binary from a file, but do not update \ref config
46+
/// \param filename the file name of the goto binary
47+
/// \param message_handler for diagnostics
48+
/// \return goto model on success, {} on failure
3949
optionalt<goto_modelt>
4050
read_goto_binary(const std::string &filename, message_handlert &message_handler)
4151
{
@@ -50,6 +60,12 @@ read_goto_binary(const std::string &filename, message_handlert &message_handler)
5060
return std::move(dest);
5161
}
5262

63+
/// \brief Read a goto binary from a file, but do not update \ref config
64+
/// \param filename the file name of the goto binary
65+
/// \param symbol_table the symbol table from the goto binary
66+
/// \param goto_functions the goto functions from the goto binary
67+
/// \param message_handler for diagnostics
68+
/// \return true on failure, false on success
5369
bool read_goto_binary(
5470
const std::string &filename,
5571
symbol_tablet &symbol_table,
@@ -206,8 +222,10 @@ bool is_goto_binary(const std::string &filename)
206222
return false;
207223
}
208224

209-
/// reads an object file
210-
/// \par parameters: a file_name
225+
/// \brief reads an object file, and also updates config
226+
/// \param file_name file name of the goto binary
227+
/// \param dest the goto model returned
228+
/// \param message_handler for diagnostics
211229
/// \return true on error, false otherwise
212230
bool read_object_and_link(
213231
const std::string &file_name,
@@ -241,8 +259,9 @@ bool read_object_and_link(
241259
return false;
242260
}
243261

244-
/// reads an object file
245-
/// \par parameters: a file_name
262+
/// \brief reads an object file, and also updates the config
263+
/// \param file_name file name of the goto binary
264+
/// \param message_handler for diagnostics
246265
/// \return true on error, false otherwise
247266
bool read_object_and_link(
248267
const std::string &file_name,

0 commit comments

Comments
 (0)