Calling getTemplateArgs() every iteration is wasteful. This should
be done once outside of the loop. Even better, use a foreach loop and
get rid of the index varible!
Hey buddy. I wanted to tell you this before you heard it from someone
else...
I refactored ICG.
Now, it's gonna look a little scary at first. But I promise you'll like
it when you get used to it. It'll be fine. You can trust me. #341
The call getRBraceLoc to find the ending source location of things is gone. Replaced
it with getting the source range and get the end of that range. Also the way to
get clang/llvm 3.9 to process c++11 code required some reordering of calls in main as
well as adding some more features to be turned on.
This changes back the default behavior to not use offsetof in io_src code.
Added a flag to ICG, -c or --compat15, to globally generate offsetof statements.
Added an ENV variable that can be used to generate offsetof statements by file or directory.
Added in a warning if classes parsed at ICG time are different in size than at runtime.
Added a check that was in 15 that tested the platform we are running on. If we
are on an mac, we want to skip fully qualifying variable names because it creates
code that doesn't compile under clang.
Added back the code that set the offset of variables with the offsetof function. This
code is running by default. Any code that includes #ifndef TRICK_ICG in
classes/structures will want this on.
Added a flag to ICG that allows us to turn off writing of these lines. If the flag
is present, ICG may write out io_src code for private/protected variables that it could
not reach if an offsetof function was required. Code cannot have any #ifndef TRICK_ICG
present in classes/structures for this to work.
We were ignoring classes completely if it was found in to be in an external library
directory. We need to partially process it so it is included in the ICG generated
class_map file which registers attributes of classes and eventually works it's way
to populating the S_sie file.
Once we determine the type of a variable we should stop processing the
AST tree at that point. We do this for record types but not for the
built in types. Changed the return value of the process builtin
function to false so we stop processing.
So using consts as arguments to STLs causes errors in our io code and SWIG.
Added a check for const template arguments and going to ignore them for
both ICG and what we input to SWIG.
Created man pages for each executable we have in bin. Updated the
couple of man pages we did have in there. Modified trick-CP
to accept arguments. Updated the version number reported by ICG
as well.
Modified the makefile to define LIBCLANG_MAJOR, LIBCLANG_MINOR, and
LIBCLANG_PATCHLEVEL based on the llvm-config executable in the llvm
directory pointed to by the configuration. These new variable names
are independent of the __clang_major__, etc. variables we were defining
only in Linux. Using these names, we can reduce the clang version
checks to a single consistent set of version numbers. We don't have
to deal with the different version numbers assigned by Apple.
Removed the lines that set the compiler to clang++, defaulting
it to g++. Added lines in the makefile to set __clang_major__,
__clang_minor__, and __clang_patchlevel__. These are required
to compile several of the files in the ICG directory.
refs #259
Set LD in our makefiles to the ld executable found by configure.
Changed the final sim link to use TRICK_CPPC as the link command since
it was using the compiler anyways. Changed the places where we use "ld" to
use LD.
refs #131
Used the mods field in the attributes to indicate of "--" was specified in the header file. We
still save the units as "1" to keep it compatible with udunits. When outputting the variable
in data recording or variable server we check to see if the mods field for "--" is set. We
output "--" if the mods field is set. Also allowed "--" to persist in data products.
refs #254
Added a makefile install rule to copy the header files out of
er7_utils to the install directory. Adjusted ICG to ignore
Trick header files if they are installed.
refs #246
Changed the include for udunits to #include <udunits2.h> to work
on all platforms. Added the include directory /usr/include/udunits2
for Linux.
refs #231
Initial checkin of using udunits for measurement units conversions. Replaced
our conversion code in ICG and swig code to use udunits.
Also added code to convert unit symbols that we used in Trick that are different
names in udunits.
Added a sim_object that will eventually allow users to specify a custom
set of files to read units information.
refs #231
ICG dies on a strdup if the the input file is empty. Added a check for
an empty input file name. We exit with an error message if there is
no input file given.
refs #229
clang changed a call in 3.8.0 from uppercase to lowercase. I changed
pp.getBuiltinInfo().InitializeBuiltins to pp.getBuiltinInfo().initializeBuiltins
refs #174
We need to exclude STL or other template io_src code being created with they use
a protected/private enumerations, just like classes. Also remove a check for
a static bitfield, because you can't have a static bitfield.
refs #218
I moved the item size into the attribute structure itself. When moving this, I did not follow
what was written before. The difference caused problems. Fixed it so the size
written now matches what was written before.
refs #218