mirror of
https://github.com/nasa/trick.git
synced 2025-01-18 10:46:26 +00:00
Merge pull request #875 from nasa/llvm-9
This commit is contained in:
commit
c79649b7ca
2
Makefile
2
Makefile
@ -184,7 +184,7 @@ $(ER7_UTILS_DIRS): icg_sim_serv
|
||||
# header files.
|
||||
.PHONY: icg_sim_serv
|
||||
icg_sim_serv: $(ICG_EXE)
|
||||
${TRICK_HOME}/bin/trick-ICG -s -m ${TRICK_CXXFLAGS} ${TRICK_SYSTEM_CXXFLAGS} ${TRICK_HOME}/include/trick/files_to_ICG.hh
|
||||
${TRICK_HOME}/bin/trick-ICG -sim_services -m ${TRICK_CXXFLAGS} ${TRICK_SYSTEM_CXXFLAGS} ${TRICK_HOME}/include/trick/files_to_ICG.hh
|
||||
|
||||
# 1.1.1.4.1 Build the Interface Code Generator (ICG) executable.
|
||||
$(ICG_EXE) :
|
||||
|
@ -197,7 +197,7 @@ ICG:
|
||||
|
||||
force_ICG:
|
||||
$(PRINT_ICG)
|
||||
$(call ECHO_AND_LOG,${TRICK_HOME}/bin/trick-ICG -f -m ${TRICK_ICGFLAGS} ${TRICK_CXXFLAGS} ${TRICK_SYSTEM_CXXFLAGS} S_source.hh)
|
||||
$(call ECHO_AND_LOG,${TRICK_HOME}/bin/trick-ICG -force -m ${TRICK_ICGFLAGS} ${TRICK_CXXFLAGS} ${TRICK_SYSTEM_CXXFLAGS} S_source.hh)
|
||||
|
||||
# Create makefile for IO code
|
||||
build/Makefile_io_src: S_source.hh | build
|
||||
|
@ -43,13 +43,9 @@ void FindTrickICG::If(clang::SourceLocation Loc, clang::SourceRange ConditionRan
|
||||
{
|
||||
if ( ConditionRange.isValid() ) {
|
||||
// Get the full text of the if statement into a string
|
||||
clang::FullSourceLoc fsl_begin(ConditionRange.getBegin() , ci.getSourceManager()) ;
|
||||
clang::FullSourceLoc fsl_end(ConditionRange.getEnd() , ci.getSourceManager()) ;
|
||||
std::string if_text( fsl_begin.getCharacterData() ,
|
||||
(size_t)(fsl_end.getCharacterData() - fsl_begin.getCharacterData())) ;
|
||||
|
||||
llvm::StringRef ref = clang::Lexer::getSourceText(clang::CharSourceRange::getCharRange(ConditionRange), ci.getSourceManager(), clang::LangOptions());
|
||||
// if the if statement contains TRICK_ICG we need to mark it.
|
||||
if ( if_text.find("TRICK_ICG") != std::string::npos ) {
|
||||
if ( ref.str().find("TRICK_ICG") != std::string::npos ) {
|
||||
// for each header in the stack, mark them as being exposed to TRICK_ICG
|
||||
std::vector<std::string>::iterator it ;
|
||||
for ( it = included_files.begin() ; it != included_files.end() ; it++ ) {
|
||||
|
@ -29,18 +29,17 @@
|
||||
|
||||
/* Command line arguments. These work better as globals, as suggested in llvm/CommandLine documentation */
|
||||
llvm::cl::list<std::string> include_dirs("I", llvm::cl::Prefix, llvm::cl::desc("Include directory"), llvm::cl::value_desc("directory"));
|
||||
llvm::cl::list<std::string> f_options("f", llvm::cl::Prefix, llvm::cl::desc("Compiler options that have f prefix"), llvm::cl::value_desc("option"));
|
||||
llvm::cl::list<std::string> isystem_dirs("isystem", llvm::cl::Prefix, llvm::cl::desc("Include directory, suppress all warnings"), llvm::cl::value_desc("directory"));
|
||||
llvm::cl::list<std::string> defines("D", llvm::cl::Prefix, llvm::cl::desc("Defines"), llvm::cl::value_desc("define"));
|
||||
// TODO: remove units_truth_is_scary in 2021.
|
||||
llvm::cl::opt<bool> units_truth_is_scary("units-truth-is-scary", llvm::cl::desc("DEPRECATED: Don't print units conversion messages"));
|
||||
llvm::cl::opt<bool> sim_services_flag("s", llvm::cl::desc("Gernerate io_src for Trick core headers"));
|
||||
llvm::cl::opt<bool> force("f", llvm::cl::desc("Force all io_src files to be generated"));
|
||||
llvm::cl::opt<bool> sim_services_flag("sim_services", llvm::cl::desc("Gernerate io_src for Trick core headers"));
|
||||
llvm::cl::opt<bool> force("force", llvm::cl::desc("Force all io_src files to be generated"));
|
||||
llvm::cl::opt<int> attr_version("v", llvm::cl::desc("Select version of attributes to produce. 10 and 13 are valid"), llvm::cl::init(10));
|
||||
llvm::cl::opt<int> debug_level("d", llvm::cl::desc("Set debug level"), llvm::cl::init(0), llvm::cl::ZeroOrMore);
|
||||
llvm::cl::opt<bool> create_map("m", llvm::cl::desc("Create map files"), llvm::cl::init(false));
|
||||
llvm::cl::opt<std::string> output_dir("o", llvm::cl::desc("Output directory"));
|
||||
llvm::cl::alias ssf_alias("sim_services" , llvm::cl::desc("Alias for -s") , llvm::cl::aliasopt(sim_services_flag));
|
||||
llvm::cl::alias force_alias("force" , llvm::cl::desc("Alias for -f") , llvm::cl::aliasopt(force));
|
||||
llvm::cl::list<std::string> input_file_names(llvm::cl::Positional, llvm::cl::desc("<input_file>"), llvm::cl::ZeroOrMore);
|
||||
llvm::cl::list<std::string> sink(llvm::cl::Sink, llvm::cl::ZeroOrMore);
|
||||
llvm::cl::list<std::string> pre_compiled_headers("include", llvm::cl::Prefix, llvm::cl::desc("pre-compiled headers"), llvm::cl::value_desc("pre_compiled_headers"));
|
||||
|
@ -90,23 +90,23 @@ clean :
|
||||
# Builds gtest.a and gtest_main.a.
|
||||
|
||||
io_MM_user_defined_types.o : MM_user_defined_types.hh
|
||||
${TRICK_HOME}/bin/trick-ICG -s -o ./io_src $(TRICK_CPPFLAGS) $<
|
||||
${TRICK_HOME}/bin/trick-ICG -sim_services -o ./io_src $(TRICK_CPPFLAGS) $<
|
||||
$(TRICK_CXX) $(TRICK_CPPFLAGS) -c io_src/io_MM_user_defined_types.cpp
|
||||
|
||||
io_MM_alloc_deps.o : MM_alloc_deps.hh
|
||||
${TRICK_HOME}/bin/trick-ICG -s -o ./io_src $(TRICK_CPPFLAGS) $<
|
||||
${TRICK_HOME}/bin/trick-ICG -sim_services -o ./io_src $(TRICK_CPPFLAGS) $<
|
||||
$(TRICK_CXX) $(TRICK_CPPFLAGS) -c io_src/io_MM_alloc_deps.cpp
|
||||
|
||||
io_MM_write_checkpoint.o : MM_write_checkpoint.hh
|
||||
${TRICK_HOME}/bin/trick-ICG -s -o ./io_src $(TRICK_CPPFLAGS) $<
|
||||
${TRICK_HOME}/bin/trick-ICG -sim_services -o ./io_src $(TRICK_CPPFLAGS) $<
|
||||
$(TRICK_CXX) $(TRICK_CPPFLAGS) -c io_src/io_MM_write_checkpoint.cpp
|
||||
|
||||
io_MM_get_enumerated.o : MM_get_enumerated.hh
|
||||
${TRICK_HOME}/bin/trick-ICG -s -o ./io_src $(TRICK_CPPFLAGS) $<
|
||||
${TRICK_HOME}/bin/trick-ICG -sim_services -o ./io_src $(TRICK_CPPFLAGS) $<
|
||||
$(TRICK_CXX) $(TRICK_CPPFLAGS) -c io_src/io_MM_get_enumerated.cpp
|
||||
|
||||
io_MM_ref_name_from_address.o : MM_ref_name_from_address.hh
|
||||
${TRICK_HOME}/bin/trick-ICG -s -o ./io_src $(TRICK_CPPFLAGS) $<
|
||||
${TRICK_HOME}/bin/trick-ICG -sim_services -o ./io_src $(TRICK_CPPFLAGS) $<
|
||||
$(TRICK_CXX) $(TRICK_CPPFLAGS) -c io_src/io_MM_ref_name_from_address.cpp
|
||||
|
||||
MM_creation_unittest.o : MM_creation_unittest.cc
|
||||
|
Loading…
Reference in New Issue
Block a user