3.0.12 (HEAD-f942b966)
3.2.1 Compiler Support Library
Seashell’s compiler support library glues Seashell’s Racket sources
with the infrastructure provided by LLVM and Clang.
Internal library developers should consult the documentation contained in
/src/backend/compiler/compiler.cc
The following functions and types are exported for public use in Seashell’s Racket
sources:
3.2.1.1 Types
3.2.1.2 Creating and Deleting Compiler Instances
Returns the version of Clang that the library is linked
against.
Creates a new instance of the Seashell compiler.
Frees all resources allocated for a Seashell
compiler instance.
3.2.1.3 Manipulating Compiliation Files and Flags
Adds a source file to be compiled.
Clears the compiler’s list of files to compile.
Adds a compilation flag to the compiler.
Clears all compilation flags set for the compiler.
3.2.1.4 Error Reporting
Gets any errors or warnings from the intermediate
linkage step.
Note: The string returned is only valid while
the compiler instance exists and until the next call
of "seashell_compiler_run".
Gets the number of compilation diagnostic messages available
for the n’th file.
Gets the line number of the
k’th available diagnostic message
for the n’th file.
Gets the column number of the
k’th available diagnostic message
for the n’th file.
Gets if the k’th available diagnostic for the n’th
file is an error diagnostic.
Gets file name for the k’th available
diagnostic message for the n’th file.
Gets the k’th available diagnostic message
for the n’th file.
3.2.1.5 Running the Compiler
Runs the Seashell compiler. Returns 0 on success,
nonzero otherwise.
Returns a pointer to the resulting compiled object, if any.
The length of the result is returned through the output
argument length.