Skip to content

Commit a0184ac

Browse files
authored
Merge pull request #662 from nasa/fix-fpp-filenames
Fix regression in fpp-filenames and fpp-depend
2 parents 66ab6dd + 09bb6d5 commit a0184ac

8 files changed

Lines changed: 1 addition & 27 deletions

compiler/lib/src/main/scala/codegen/ComputeGeneratedFiles.scala

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,7 @@ object ComputeGeneratedFiles {
1010
/** Computes autocoded files (XML, C++ and JSON Dictionary) */
1111
def getAutocodeFiles(tul: List[Ast.TransUnit]): Result.Result[List[String]] =
1212
for {
13-
// Perform analysis only up to the point we need
1413
a <- enterSymbols(tul)
15-
a <- CheckUses.visitList(a, tul, CheckUses.transUnit)
16-
_ <- CheckUseDefCycles.visitList(a, tul, CheckUseDefCycles.transUnit)
17-
a <- CheckTypeUses.visitList(a, tul, CheckTypeUses.transUnit)
18-
1914
xmlFiles <- getXmlFiles(a, tul)
2015
cppFiles <- getAutocodeCppFiles(a, tul)
2116
dictFiles <- getDictionaryJsonFiles(a, tul)

compiler/lib/src/main/scala/codegen/CppWriter/ComputeAutocodeCppFiles.scala

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,7 @@ object ComputeAutocodeCppFiles extends ComputeCppFiles {
3434
val name = s.getName(Symbol.AliasType(aNode))
3535
val loc = Locations.get(node.id)
3636
val fileName = ComputeCppFiles.FileNames.getAliasType(name)
37-
val t = s.a.typeMap(node.id)
38-
39-
for {
40-
s <- addHppMapping(s, fileName, Some(loc), "hpp")
41-
// Only add C header if its supported
42-
s <- s.isTypeSupportedInC(t) match {
43-
case true => addHppMapping(s, fileName, Some(loc), "h")
44-
case false => Right(s)
45-
}
46-
} yield s
37+
addHppMapping(s, fileName, Some(loc), "hpp")
4738
}
4839

4940
override def defArrayAnnotatedNode(

compiler/tools/fpp-depend/test/filenames_auto_generated_output.ref.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ TTopologyAppAi.xml
3232
TTopologyDictionary.json
3333
T_PTlmPacketsAc.cpp
3434
T_PTlmPacketsAc.hpp
35-
WithCDefinitionAliasAc.h
3635
WithCDefinitionAliasAc.hpp
37-
WithCDefinitionBuiltinAliasAc.h
3836
WithCDefinitionBuiltinAliasAc.hpp
3937
WithoutCDefinitionAliasAc.hpp

compiler/tools/fpp-depend/test/filenames_generated_output.ref.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ TTopologyAppAi.xml
3232
TTopologyDictionary.json
3333
T_PTlmPacketsAc.cpp
3434
T_PTlmPacketsAc.hpp
35-
WithCDefinitionAliasAc.h
3635
WithCDefinitionAliasAc.hpp
37-
WithCDefinitionBuiltinAliasAc.h
3836
WithCDefinitionBuiltinAliasAc.hpp
3937
WithoutCDefinitionAliasAc.hpp

compiler/tools/fpp-depend/test/filenames_include_auto_generated_output.ref.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ TTopologyAppAi.xml
3232
TTopologyDictionary.json
3333
T_PTlmPacketsAc.cpp
3434
T_PTlmPacketsAc.hpp
35-
WithCDefinitionAliasAc.h
3635
WithCDefinitionAliasAc.hpp
37-
WithCDefinitionBuiltinAliasAc.h
3836
WithCDefinitionBuiltinAliasAc.hpp
3937
WithoutCDefinitionAliasAc.hpp

compiler/tools/fpp-depend/test/filenames_include_generated_output.ref.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ TTopologyAppAi.xml
3232
TTopologyDictionary.json
3333
T_PTlmPacketsAc.cpp
3434
T_PTlmPacketsAc.hpp
35-
WithCDefinitionAliasAc.h
3635
WithCDefinitionAliasAc.hpp
37-
WithCDefinitionBuiltinAliasAc.h
3836
WithCDefinitionBuiltinAliasAc.hpp
3937
WithoutCDefinitionAliasAc.hpp

compiler/tools/fpp-filenames/test/include.ref.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ TTopologyAppAi.xml
3232
TTopologyDictionary.json
3333
T_PTlmPacketsAc.cpp
3434
T_PTlmPacketsAc.hpp
35-
WithCDefinitionAliasAc.h
3635
WithCDefinitionAliasAc.hpp
37-
WithCDefinitionBuiltinAliasAc.h
3836
WithCDefinitionBuiltinAliasAc.hpp
3937
WithoutCDefinitionAliasAc.hpp

compiler/tools/fpp-filenames/test/ok.ref.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ TTopologyAppAi.xml
3232
TTopologyDictionary.json
3333
T_PTlmPacketsAc.cpp
3434
T_PTlmPacketsAc.hpp
35-
WithCDefinitionAliasAc.h
3635
WithCDefinitionAliasAc.hpp
37-
WithCDefinitionBuiltinAliasAc.h
3836
WithCDefinitionBuiltinAliasAc.hpp
3937
WithoutCDefinitionAliasAc.hpp

0 commit comments

Comments
 (0)