|
|
|
@ -1,4 +1,5 @@
@@ -1,4 +1,5 @@
|
|
|
|
|
using System.Collections.Generic; |
|
|
|
|
using System; |
|
|
|
|
using System.Collections.Generic; |
|
|
|
|
using System.Linq; |
|
|
|
|
using CppSharp.AST; |
|
|
|
|
|
|
|
|
@ -73,6 +74,19 @@ namespace CppSharp.Passes
@@ -73,6 +74,19 @@ namespace CppSharp.Passes
|
|
|
|
|
decl.IsGenerated = false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public override bool VisitTranslationUnit(TranslationUnit unit) |
|
|
|
|
{ |
|
|
|
|
var expansions = unit.PreprocessedEntities.OfType<MacroExpansion>(); |
|
|
|
|
|
|
|
|
|
if (expansions.Any(e => e.Text == Prefix + "_IGNORE_FILE")) |
|
|
|
|
{ |
|
|
|
|
unit.IsGenerated = false; |
|
|
|
|
unit.ExplicityIgnored = true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return base.VisitTranslationUnit(unit); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public override bool VisitClassDecl(Class @class) |
|
|
|
|
{ |
|
|
|
|
var expansions = @class.PreprocessedEntities.OfType<MacroExpansion>(); |
|
|
|
|