Skip to content

Commit 51a109d

Browse files
committed
Removed an unused field and redundant parameters from the parser.
Signed-off-by: Dimitar Dobrev <[email protected]>
1 parent 4945b59 commit 51a109d

File tree

11 files changed

+16
-431
lines changed

11 files changed

+16
-431
lines changed

src/CppParser/Bindings/CLI/CppParser.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ namespace CppSharp
1818
enum struct SourceLocationKind;
1919
ref class ClangParser;
2020
ref class CppParserOptions;
21-
ref class Parser;
2221
ref class ParserDiagnostic;
2322
ref class ParserResult;
2423
ref class ParserTargetInfo;

src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppSharp.CppParser.cs

Lines changed: 1 addition & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -17899,53 +17899,6 @@ public enum SourceLocationKind
1789917899
User = 4
1790017900
}
1790117901

17902-
public unsafe partial class Parser
17903-
{
17904-
[StructLayout(LayoutKind.Explicit, Size = 0)]
17905-
public partial struct __Internal
17906-
{
17907-
}
17908-
17909-
public global::System.IntPtr __Instance { get; protected set; }
17910-
17911-
protected int __PointerAdjustment;
17912-
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.Parser> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.Parser>();
17913-
protected void*[] __OriginalVTables;
17914-
17915-
protected bool __ownsNativeInstance;
17916-
17917-
internal static global::CppSharp.Parser.Parser __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
17918-
{
17919-
return new global::CppSharp.Parser.Parser(native.ToPointer(), skipVTables);
17920-
}
17921-
17922-
internal static global::CppSharp.Parser.Parser __CreateInstance(global::CppSharp.Parser.Parser.__Internal native, bool skipVTables = false)
17923-
{
17924-
return new global::CppSharp.Parser.Parser(native, skipVTables);
17925-
}
17926-
17927-
private static void* __CopyValue(global::CppSharp.Parser.Parser.__Internal native)
17928-
{
17929-
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.Parser.__Internal));
17930-
*(global::CppSharp.Parser.Parser.__Internal*) ret = native;
17931-
return ret.ToPointer();
17932-
}
17933-
17934-
private Parser(global::CppSharp.Parser.Parser.__Internal native, bool skipVTables = false)
17935-
: this(__CopyValue(native), skipVTables)
17936-
{
17937-
__ownsNativeInstance = true;
17938-
NativeToManagedMap[__Instance] = this;
17939-
}
17940-
17941-
protected Parser(void* native, bool skipVTables = false)
17942-
{
17943-
if (native == null)
17944-
return;
17945-
__Instance = new global::System.IntPtr(native);
17946-
}
17947-
}
17948-
1794917902
public unsafe partial class CppParserOptions : IDisposable
1795017903
{
1795117904
[StructLayout(LayoutKind.Explicit, Size = 152)]
@@ -18819,7 +18772,7 @@ public int ColumnNumber
1881918772

1882018773
public unsafe partial class ParserResult : IDisposable
1882118774
{
18822-
[StructLayout(LayoutKind.Explicit, Size = 28)]
18775+
[StructLayout(LayoutKind.Explicit, Size = 24)]
1882318776
public partial struct __Internal
1882418777
{
1882518778
[FieldOffset(0)]
@@ -18834,9 +18787,6 @@ public partial struct __Internal
1883418787
[FieldOffset(20)]
1883518788
internal global::System.IntPtr library;
1883618789

18837-
[FieldOffset(24)]
18838-
internal global::System.IntPtr codeParser;
18839-
1884018790
[SuppressUnmanagedCodeSecurity]
1884118791
[DllImport("CppSharp.CppParser", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
1884218792
EntryPoint="_ZN8CppSharp9CppParser12ParserResultC2Ev")]
@@ -19018,24 +18968,6 @@ public void ClearDiagnostics()
1901818968
}
1901918969
}
1902018970

19021-
public global::CppSharp.Parser.Parser CodeParser
19022-
{
19023-
get
19024-
{
19025-
global::CppSharp.Parser.Parser __result0;
19026-
if (((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser == IntPtr.Zero) __result0 = null;
19027-
else if (global::CppSharp.Parser.Parser.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser))
19028-
__result0 = (global::CppSharp.Parser.Parser) global::CppSharp.Parser.Parser.NativeToManagedMap[((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser];
19029-
else __result0 = global::CppSharp.Parser.Parser.__CreateInstance(((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser);
19030-
return __result0;
19031-
}
19032-
19033-
set
19034-
{
19035-
((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
19036-
}
19037-
}
19038-
1903918971
public uint DiagnosticsCount
1904018972
{
1904118973
get

src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppSharp.CppParser.cs

Lines changed: 1 addition & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -17899,53 +17899,6 @@ public enum SourceLocationKind
1789917899
User = 4
1790017900
}
1790117901

17902-
public unsafe partial class Parser
17903-
{
17904-
[StructLayout(LayoutKind.Explicit, Size = 0)]
17905-
public partial struct __Internal
17906-
{
17907-
}
17908-
17909-
public global::System.IntPtr __Instance { get; protected set; }
17910-
17911-
protected int __PointerAdjustment;
17912-
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.Parser> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.Parser>();
17913-
protected void*[] __OriginalVTables;
17914-
17915-
protected bool __ownsNativeInstance;
17916-
17917-
internal static global::CppSharp.Parser.Parser __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
17918-
{
17919-
return new global::CppSharp.Parser.Parser(native.ToPointer(), skipVTables);
17920-
}
17921-
17922-
internal static global::CppSharp.Parser.Parser __CreateInstance(global::CppSharp.Parser.Parser.__Internal native, bool skipVTables = false)
17923-
{
17924-
return new global::CppSharp.Parser.Parser(native, skipVTables);
17925-
}
17926-
17927-
private static void* __CopyValue(global::CppSharp.Parser.Parser.__Internal native)
17928-
{
17929-
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.Parser.__Internal));
17930-
*(global::CppSharp.Parser.Parser.__Internal*) ret = native;
17931-
return ret.ToPointer();
17932-
}
17933-
17934-
private Parser(global::CppSharp.Parser.Parser.__Internal native, bool skipVTables = false)
17935-
: this(__CopyValue(native), skipVTables)
17936-
{
17937-
__ownsNativeInstance = true;
17938-
NativeToManagedMap[__Instance] = this;
17939-
}
17940-
17941-
protected Parser(void* native, bool skipVTables = false)
17942-
{
17943-
if (native == null)
17944-
return;
17945-
__Instance = new global::System.IntPtr(native);
17946-
}
17947-
}
17948-
1794917902
public unsafe partial class CppParserOptions : IDisposable
1795017903
{
1795117904
[StructLayout(LayoutKind.Explicit, Size = 188)]
@@ -18819,7 +18772,7 @@ public int ColumnNumber
1881918772

1882018773
public unsafe partial class ParserResult : IDisposable
1882118774
{
18822-
[StructLayout(LayoutKind.Explicit, Size = 28)]
18775+
[StructLayout(LayoutKind.Explicit, Size = 24)]
1882318776
public partial struct __Internal
1882418777
{
1882518778
[FieldOffset(0)]
@@ -18834,9 +18787,6 @@ public partial struct __Internal
1883418787
[FieldOffset(20)]
1883518788
internal global::System.IntPtr library;
1883618789

18837-
[FieldOffset(24)]
18838-
internal global::System.IntPtr codeParser;
18839-
1884018790
[SuppressUnmanagedCodeSecurity]
1884118791
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
1884218792
EntryPoint="??0ParserResult@CppParser@CppSharp@@QAE@XZ")]
@@ -19018,24 +18968,6 @@ public void ClearDiagnostics()
1901818968
}
1901918969
}
1902018970

19021-
public global::CppSharp.Parser.Parser CodeParser
19022-
{
19023-
get
19024-
{
19025-
global::CppSharp.Parser.Parser __result0;
19026-
if (((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser == IntPtr.Zero) __result0 = null;
19027-
else if (global::CppSharp.Parser.Parser.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser))
19028-
__result0 = (global::CppSharp.Parser.Parser) global::CppSharp.Parser.Parser.NativeToManagedMap[((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser];
19029-
else __result0 = global::CppSharp.Parser.Parser.__CreateInstance(((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser);
19030-
return __result0;
19031-
}
19032-
19033-
set
19034-
{
19035-
((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
19036-
}
19037-
}
19038-
1903918971
public uint DiagnosticsCount
1904018972
{
1904118973
get

src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppSharp.CppParser.cs

Lines changed: 1 addition & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -17898,53 +17898,6 @@ public enum SourceLocationKind
1789817898
User = 4
1789917899
}
1790017900

17901-
public unsafe partial class Parser
17902-
{
17903-
[StructLayout(LayoutKind.Explicit, Size = 0)]
17904-
public partial struct __Internal
17905-
{
17906-
}
17907-
17908-
public global::System.IntPtr __Instance { get; protected set; }
17909-
17910-
protected int __PointerAdjustment;
17911-
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.Parser> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.Parser>();
17912-
protected void*[] __OriginalVTables;
17913-
17914-
protected bool __ownsNativeInstance;
17915-
17916-
internal static global::CppSharp.Parser.Parser __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
17917-
{
17918-
return new global::CppSharp.Parser.Parser(native.ToPointer(), skipVTables);
17919-
}
17920-
17921-
internal static global::CppSharp.Parser.Parser __CreateInstance(global::CppSharp.Parser.Parser.__Internal native, bool skipVTables = false)
17922-
{
17923-
return new global::CppSharp.Parser.Parser(native, skipVTables);
17924-
}
17925-
17926-
private static void* __CopyValue(global::CppSharp.Parser.Parser.__Internal native)
17927-
{
17928-
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.Parser.__Internal));
17929-
*(global::CppSharp.Parser.Parser.__Internal*) ret = native;
17930-
return ret.ToPointer();
17931-
}
17932-
17933-
private Parser(global::CppSharp.Parser.Parser.__Internal native, bool skipVTables = false)
17934-
: this(__CopyValue(native), skipVTables)
17935-
{
17936-
__ownsNativeInstance = true;
17937-
NativeToManagedMap[__Instance] = this;
17938-
}
17939-
17940-
protected Parser(void* native, bool skipVTables = false)
17941-
{
17942-
if (native == null)
17943-
return;
17944-
__Instance = new global::System.IntPtr(native);
17945-
}
17946-
}
17947-
1794817901
public unsafe partial class CppParserOptions : IDisposable
1794917902
{
1795017903
[StructLayout(LayoutKind.Explicit, Size = 296)]
@@ -18818,7 +18771,7 @@ public int ColumnNumber
1881818771

1881918772
public unsafe partial class ParserResult : IDisposable
1882018773
{
18821-
[StructLayout(LayoutKind.Explicit, Size = 56)]
18774+
[StructLayout(LayoutKind.Explicit, Size = 48)]
1882218775
public partial struct __Internal
1882318776
{
1882418777
[FieldOffset(0)]
@@ -18833,9 +18786,6 @@ public partial struct __Internal
1883318786
[FieldOffset(40)]
1883418787
internal global::System.IntPtr library;
1883518788

18836-
[FieldOffset(48)]
18837-
internal global::System.IntPtr codeParser;
18838-
1883918789
[SuppressUnmanagedCodeSecurity]
1884018790
[DllImport("CppSharp.CppParser", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
1884118791
EntryPoint="_ZN8CppSharp9CppParser12ParserResultC2Ev")]
@@ -19017,24 +18967,6 @@ public void ClearDiagnostics()
1901718967
}
1901818968
}
1901918969

19020-
public global::CppSharp.Parser.Parser CodeParser
19021-
{
19022-
get
19023-
{
19024-
global::CppSharp.Parser.Parser __result0;
19025-
if (((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser == IntPtr.Zero) __result0 = null;
19026-
else if (global::CppSharp.Parser.Parser.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser))
19027-
__result0 = (global::CppSharp.Parser.Parser) global::CppSharp.Parser.Parser.NativeToManagedMap[((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser];
19028-
else __result0 = global::CppSharp.Parser.Parser.__CreateInstance(((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser);
19029-
return __result0;
19030-
}
19031-
19032-
set
19033-
{
19034-
((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
19035-
}
19036-
}
19037-
1903818970
public uint DiagnosticsCount
1903918971
{
1904018972
get

src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs

Lines changed: 1 addition & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -17898,53 +17898,6 @@ public enum SourceLocationKind
1789817898
User = 4
1789917899
}
1790017900

17901-
public unsafe partial class Parser
17902-
{
17903-
[StructLayout(LayoutKind.Explicit, Size = 0)]
17904-
public partial struct __Internal
17905-
{
17906-
}
17907-
17908-
public global::System.IntPtr __Instance { get; protected set; }
17909-
17910-
protected int __PointerAdjustment;
17911-
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.Parser> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::CppSharp.Parser.Parser>();
17912-
protected void*[] __OriginalVTables;
17913-
17914-
protected bool __ownsNativeInstance;
17915-
17916-
internal static global::CppSharp.Parser.Parser __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
17917-
{
17918-
return new global::CppSharp.Parser.Parser(native.ToPointer(), skipVTables);
17919-
}
17920-
17921-
internal static global::CppSharp.Parser.Parser __CreateInstance(global::CppSharp.Parser.Parser.__Internal native, bool skipVTables = false)
17922-
{
17923-
return new global::CppSharp.Parser.Parser(native, skipVTables);
17924-
}
17925-
17926-
private static void* __CopyValue(global::CppSharp.Parser.Parser.__Internal native)
17927-
{
17928-
var ret = Marshal.AllocHGlobal(sizeof(global::CppSharp.Parser.Parser.__Internal));
17929-
*(global::CppSharp.Parser.Parser.__Internal*) ret = native;
17930-
return ret.ToPointer();
17931-
}
17932-
17933-
private Parser(global::CppSharp.Parser.Parser.__Internal native, bool skipVTables = false)
17934-
: this(__CopyValue(native), skipVTables)
17935-
{
17936-
__ownsNativeInstance = true;
17937-
NativeToManagedMap[__Instance] = this;
17938-
}
17939-
17940-
protected Parser(void* native, bool skipVTables = false)
17941-
{
17942-
if (native == null)
17943-
return;
17944-
__Instance = new global::System.IntPtr(native);
17945-
}
17946-
}
17947-
1794817901
public unsafe partial class CppParserOptions : IDisposable
1794917902
{
1795017903
[StructLayout(LayoutKind.Explicit, Size = 320)]
@@ -18818,7 +18771,7 @@ public int ColumnNumber
1881818771

1881918772
public unsafe partial class ParserResult : IDisposable
1882018773
{
18821-
[StructLayout(LayoutKind.Explicit, Size = 56)]
18774+
[StructLayout(LayoutKind.Explicit, Size = 48)]
1882218775
public partial struct __Internal
1882318776
{
1882418777
[FieldOffset(0)]
@@ -18833,9 +18786,6 @@ public partial struct __Internal
1883318786
[FieldOffset(40)]
1883418787
internal global::System.IntPtr library;
1883518788

18836-
[FieldOffset(48)]
18837-
internal global::System.IntPtr codeParser;
18838-
1883918789
[SuppressUnmanagedCodeSecurity]
1884018790
[DllImport("CppSharp.CppParser", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
1884118791
EntryPoint="_ZN8CppSharp9CppParser12ParserResultC2Ev")]
@@ -19017,24 +18967,6 @@ public void ClearDiagnostics()
1901718967
}
1901818968
}
1901918969

19020-
public global::CppSharp.Parser.Parser CodeParser
19021-
{
19022-
get
19023-
{
19024-
global::CppSharp.Parser.Parser __result0;
19025-
if (((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser == IntPtr.Zero) __result0 = null;
19026-
else if (global::CppSharp.Parser.Parser.NativeToManagedMap.ContainsKey(((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser))
19027-
__result0 = (global::CppSharp.Parser.Parser) global::CppSharp.Parser.Parser.NativeToManagedMap[((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser];
19028-
else __result0 = global::CppSharp.Parser.Parser.__CreateInstance(((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser);
19029-
return __result0;
19030-
}
19031-
19032-
set
19033-
{
19034-
((global::CppSharp.Parser.ParserResult.__Internal*) __Instance)->codeParser = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
19035-
}
19036-
}
19037-
1903818970
public uint DiagnosticsCount
1903918971
{
1904018972
get

0 commit comments

Comments
 (0)