| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Since commit 9c91919574 (cmake: work with LLVM_LINK_LLVM_DYLIB,
2019-01-17) our `llvm_libs` variable is a list of LLVM components rather
than a list of raw library names. The `version.lib` library is not a
LLVM component. Fortunately we can simply drop it because LLVM now
computes the proper list of libraries for its components.
Fixes: #133
|
|
|
|
| |
Support linking against the shared version of LLVM libraries.
|
| |
|
|
|
|
| |
Do not depend on getting it from `KWSYS_HEADER_ROOT`.
|
|
|
|
|
|
|
|
|
| |
Since LLVM/Clang SVN r275507 (Frontend: Simplify ownership model for
clang's output streams, 2016-07-15) the createDefaultOutputFile method
returns ownership of the stream via unique_ptr.
Also on Windows we now must link to `version.lib` because LLVM/Clang
now uses the GetFileVersionInfoW symbol.
|
|
|
|
|
|
|
|
| |
We include LLVM support headers and use the APIs, so we should link to
the corresponding library directly instead of depending on a transitive
dependency through other libraries we use.
GitHub-Issue: 30
|
|
|
|
|
|
| |
Use std::error_code instead of llvm::error_code. Use std::unique_ptr
instead of llvm::OwningPtr. Use llvm_map_components_to_libnames instead
of llvm_map_components_to_libraries.
|
|
|
|
|
| |
We need as parsers to support Visual Studio system header files
that contain inline assembly.
|
|
|
|
| |
Also pass the flag through so Clang reports its version too.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Create an API to perform the AST walk and XML output generation.
Create a queue that can hold both clang::Decl and clang::QualType nodes.
Add the main translation unit Decl to the queue. Follow the queue until
empty while adding new nodes to the queue only if they represent
complete types or declarations. Then queue the incomplete nodes and
follow the queue again until empty. This will allow all complete class
types to be output as needed followed by types that are referenced but
do not need complete output (like a pointed-to type).
Use "clang/AST/DeclNodes.inc" and "clang/AST/TypeNodes.def" to dispatch
visitation to a method dedicated to each AST node kind/type-class. Use
a visitor base class to provide an implementation for every visitation
method that simply reports the node as Unimplemented. This will allow
us to incrementally implement output for each AST node.
|
|
|
|
|
|
| |
Make the Clang resources available to CastXML. From the build tree
simply find and reference the resources installed with Clang. Install
the resources in our own resource directory for re-distribution.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the Clang Driver API to construct an invocation of Clang like the
main "clang" compiler tool would for syntax-only or preprocess-only
actions. Add two front-end actions, one for the '-E' preprocess-only
option and one for our syntax-only AST traversal. Implement a
syntax-only action that falls back to the Clang syntax-only action
unless xml output is requested. Leave xml output unimplemented for now.
Capture the '-o <output-file>' option ourselves since the Clang Driver
API will ignore it when using a syntax-only action. Forward it to the
compiler invocation frontend options just before constructing the
frontend action implementation.
When '--castxml-cc-<id>' is given tell the driver to suppress its own
standard include path detection. Give the driver options to configure
it to match the detected target triple and header search path. Tell
it to suppress its builtin definitions. Hook in to the front-end
action for each input source file to put the detected predefines into
the preprocessor configuration.
|
|
|
|
|
|
| |
Add members to the Options struct to hold the preprocessor and target
settings detected from a given compiler command. Add an API to fill in
the members.
|
|
|
|
|
|
|
| |
Use "--castxml-" prefix on all CastXML options to distinguish them from
options to Clang. Create an "Options" struct to hold settings to be
passed to the implementation later. Add a "--castxml-gccxml" option to
enable xml output in a gccxml-compatible format.
|
|
|
|
|
|
| |
Add a findResourceDir function to locate resources relative to the
executable location at the start of main and a getResourceDir
function to lookup the result later.
|
|
|
|
|
|
| |
Store runtime binaries in 'bin' and libraries in 'lib'.
Install runtime binaries to '<prefix>/bin' by default
and data files to '<prefix>/share/castxml' by default.
|
|
|
|
|
|
| |
Build with -fno-rtti on GNU and Clang compilers to match LLVM.
Find the LLVM package and link to the native, option, and bitreader
components.
|
|
Load command line arguments through KWSys Encoding.
Install the executable to 'bin/castxml'.
|