Browse Source

Merge pull request #292 from tomba/fixes

Fixes
pull/293/head
João Matos 11 years ago
parent
commit
f63d6219a4
  1. 2
      build/Helpers.lua
  2. 64
      build/LLVM.lua
  3. 4
      docs/GettingStarted.md
  4. 2
      src/CppParser/AST.cpp
  5. 370
      src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/AST.cs
  6. 68
      src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppParser.cs
  7. 2
      src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/Sources.cs
  8. 2
      src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/Target.cs
  9. 2
      src/CppParser/Bindings/premake4.lua

2
build/Helpers.lua

@ -19,7 +19,7 @@ gendir = path.join(builddir, "gen"); @@ -19,7 +19,7 @@ gendir = path.join(builddir, "gen");
common_flags = { "Unicode", "Symbols" }
msvc_buildflags = { "/wd4267" }
gcc_buildflags = { "-std=c++11" }
gcc_buildflags = { "-std=c++11 -fpermissive" }
msvc_cpp_defines = { }

64
build/LLVM.lua

@ -40,46 +40,46 @@ function SetupLLVMLibs() @@ -40,46 +40,46 @@ function SetupLLVMLibs()
configuration "*"
links
{
"LLVMAnalysis",
"LLVMAsmParser",
"LLVMBitReader",
"LLVMBitWriter",
"LLVMCodeGen",
"LLVMCore",
"LLVMipa",
"clangFrontend",
"clangDriver",
"clangSerialization",
"clangCodeGen",
"clangParse",
"clangSema",
"clangAnalysis",
"clangEdit",
"clangAST",
"clangLex",
"clangBasic",
"clangIndex",
"LLVMObjCARCOpts",
"LLVMLinker",
"LLVMipo",
"LLVMInstCombine",
"LLVMInstrumentation",
"LLVMVectorize",
"LLVMBitWriter",
"LLVMIRReader",
"LLVMLinker",
"LLVMMC",
"LLVMMCParser",
"LLVMObjCARCOpts",
"LLVMObject",
"LLVMAsmParser",
"LLVMOption",
"LLVMInstrumentation",
"LLVMProfileData",
"LLVMScalarOpts",
"LLVMSupport",
"LLVMTarget",
"LLVMTransformUtils",
"LLVMVectorize",
"LLVMX86AsmParser",
"LLVMX86AsmPrinter",
"LLVMX86Desc",
"LLVMObject",
"LLVMMCParser",
"LLVMBitReader",
"LLVMX86Info",
"LLVMX86AsmPrinter",
"LLVMX86Utils",
"clangAnalysis",
"clangAST",
"clangBasic",
"clangCodeGen",
"clangDriver",
"clangEdit",
"clangFrontend",
"clangLex",
"clangParse",
"clangSema",
"clangSerialization",
"clangIndex",
"LLVMCodeGen",
"LLVMScalarOpts",
"LLVMInstCombine",
"LLVMTransformUtils",
"LLVMipa",
"LLVMAnalysis",
"LLVMTarget",
"LLVMMC",
"LLVMCore",
"LLVMSupport",
}
configuration(c)

4
docs/GettingStarted.md

@ -27,9 +27,9 @@ excruciatingly slow. @@ -27,9 +27,9 @@ excruciatingly slow.
Last revisions known to work:
LLVM `r212459` / Git mirror revision `c9bf74fdc543c2da90f334e0bf8e34b128c8a615`.
LLVM `r212459` / Git mirror revision `a15d70370edd030198cb42960b62e660b9288f25`.
Clang `r212458` / Git mirror revision `30577e6c4f5ba66b8dc832ed9955b1a7475f788a`.
Clang `r212458` / Git mirror revision `c785591d768074e1666bc306086588b1242d156c`.
It has been reported that running the solution upgrade process under VS 2013 breaks the build due
to an incompatibility of .NET versions between projects (4.5 and 4.0). If you experience this

2
src/CppParser/AST.cpp

@ -563,7 +563,7 @@ Namespace::Namespace() @@ -563,7 +563,7 @@ Namespace::Namespace()
PreprocessedEntity::PreprocessedEntity()
: Declaration(DeclarationKind::PreprocessedEntity),
MacroLocation(MacroLocation::Unknown) {}
MacroLocation(AST::MacroLocation::Unknown) {}
MacroDefinition::MacroDefinition() { Kind = DeclarationKind::MacroDefinition; }

370
src/CppParser/Bindings/CSharp/i686-pc-win32/AST.cs → src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/AST.cs

File diff suppressed because it is too large Load Diff

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

@ -38,7 +38,7 @@ namespace CppSharp @@ -38,7 +38,7 @@ namespace CppSharp
public unsafe partial class ParserOptions : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 124)]
public struct Internal
public partial struct Internal
{
[FieldOffset(84)]
public global::System.IntPtr ASTContext;
@ -86,6 +86,11 @@ namespace CppSharp @@ -86,6 +86,11 @@ namespace CppSharp
EntryPoint="?addArguments@ParserOptions@CppParser@CppSharp@@QAEXPBD@Z")]
internal static extern void addArguments_0(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?clearArguments@ParserOptions@CppParser@CppSharp@@QAEXXZ")]
internal static extern void clearArguments_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?getIncludeDirs@ParserOptions@CppParser@CppSharp@@QAEPBDI@Z")]
@ -96,6 +101,11 @@ namespace CppSharp @@ -96,6 +101,11 @@ namespace CppSharp
EntryPoint="?addIncludeDirs@ParserOptions@CppParser@CppSharp@@QAEXPBD@Z")]
internal static extern void addIncludeDirs_0(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?clearIncludeDirs@ParserOptions@CppParser@CppSharp@@QAEXXZ")]
internal static extern void clearIncludeDirs_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?getSystemIncludeDirs@ParserOptions@CppParser@CppSharp@@QAEPBDI@Z")]
@ -106,6 +116,11 @@ namespace CppSharp @@ -106,6 +116,11 @@ namespace CppSharp
EntryPoint="?addSystemIncludeDirs@ParserOptions@CppParser@CppSharp@@QAEXPBD@Z")]
internal static extern void addSystemIncludeDirs_0(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?clearSystemIncludeDirs@ParserOptions@CppParser@CppSharp@@QAEXXZ")]
internal static extern void clearSystemIncludeDirs_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?getDefines@ParserOptions@CppParser@CppSharp@@QAEPBDI@Z")]
@ -116,6 +131,11 @@ namespace CppSharp @@ -116,6 +131,11 @@ namespace CppSharp
EntryPoint="?addDefines@ParserOptions@CppParser@CppSharp@@QAEXPBD@Z")]
internal static extern void addDefines_0(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?clearDefines@ParserOptions@CppParser@CppSharp@@QAEXXZ")]
internal static extern void clearDefines_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?getLibraryDirs@ParserOptions@CppParser@CppSharp@@QAEPBDI@Z")]
@ -126,6 +146,11 @@ namespace CppSharp @@ -126,6 +146,11 @@ namespace CppSharp
EntryPoint="?addLibraryDirs@ParserOptions@CppParser@CppSharp@@QAEXPBD@Z")]
internal static extern void addLibraryDirs_0(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?clearLibraryDirs@ParserOptions@CppParser@CppSharp@@QAEXXZ")]
internal static extern void clearLibraryDirs_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?getArgumentsCount@ParserOptions@CppParser@CppSharp@@QAEIXZ")]
@ -221,6 +246,11 @@ namespace CppSharp @@ -221,6 +246,11 @@ namespace CppSharp
Marshal.FreeHGlobal(arg0);
}
public void clearArguments()
{
Internal.clearArguments_0(__Instance);
}
public string getIncludeDirs(uint i)
{
var __ret = Internal.getIncludeDirs_0(__Instance, i);
@ -235,6 +265,11 @@ namespace CppSharp @@ -235,6 +265,11 @@ namespace CppSharp
Marshal.FreeHGlobal(arg0);
}
public void clearIncludeDirs()
{
Internal.clearIncludeDirs_0(__Instance);
}
public string getSystemIncludeDirs(uint i)
{
var __ret = Internal.getSystemIncludeDirs_0(__Instance, i);
@ -249,6 +284,11 @@ namespace CppSharp @@ -249,6 +284,11 @@ namespace CppSharp
Marshal.FreeHGlobal(arg0);
}
public void clearSystemIncludeDirs()
{
Internal.clearSystemIncludeDirs_0(__Instance);
}
public string getDefines(uint i)
{
var __ret = Internal.getDefines_0(__Instance, i);
@ -263,6 +303,11 @@ namespace CppSharp @@ -263,6 +303,11 @@ namespace CppSharp
Marshal.FreeHGlobal(arg0);
}
public void clearDefines()
{
Internal.clearDefines_0(__Instance);
}
public string getLibraryDirs(uint i)
{
var __ret = Internal.getLibraryDirs_0(__Instance, i);
@ -277,6 +322,11 @@ namespace CppSharp @@ -277,6 +322,11 @@ namespace CppSharp
Marshal.FreeHGlobal(arg0);
}
public void clearLibraryDirs()
{
Internal.clearLibraryDirs_0(__Instance);
}
public uint ArgumentsCount
{
get
@ -465,7 +515,7 @@ namespace CppSharp @@ -465,7 +515,7 @@ namespace CppSharp
public unsafe partial class ParserDiagnostic : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 60)]
public struct Internal
public partial struct Internal
{
[FieldOffset(48)]
public CppSharp.Parser.ParserDiagnosticLevel Level;
@ -630,7 +680,7 @@ namespace CppSharp @@ -630,7 +680,7 @@ namespace CppSharp
public unsafe partial class ParserResult : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 28)]
public struct Internal
public partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.ParserResultKind Kind;
@ -666,6 +716,11 @@ namespace CppSharp @@ -666,6 +716,11 @@ namespace CppSharp
EntryPoint="?addDiagnostics@ParserResult@CppParser@CppSharp@@QAEXAAUParserDiagnostic@23@@Z")]
internal static extern void addDiagnostics_0(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?clearDiagnostics@ParserResult@CppParser@CppSharp@@QAEXXZ")]
internal static extern void clearDiagnostics_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?getDiagnosticsCount@ParserResult@CppParser@CppSharp@@QAEIXZ")]
@ -722,6 +777,11 @@ namespace CppSharp @@ -722,6 +777,11 @@ namespace CppSharp
Internal.addDiagnostics_0(__Instance, arg0);
}
public void clearDiagnostics()
{
Internal.clearDiagnostics_0(__Instance);
}
public uint DiagnosticsCount
{
get
@ -780,7 +840,7 @@ namespace CppSharp @@ -780,7 +840,7 @@ namespace CppSharp
public unsafe partial class ClangParser : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 1)]
public struct Internal
public partial struct Internal
{
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,

2
src/CppParser/Bindings/CSharp/i686-pc-win32/Sources.cs → src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/Sources.cs

@ -13,7 +13,7 @@ namespace CppSharp @@ -13,7 +13,7 @@ namespace CppSharp
public unsafe partial struct SourceLocation
{
[StructLayout(LayoutKind.Explicit, Size = 4)]
public struct Internal
public partial struct Internal
{
[FieldOffset(0)]
public uint ID;

2
src/CppParser/Bindings/CSharp/i686-pc-win32/Target.cs → src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/Target.cs

@ -28,7 +28,7 @@ namespace CppSharp @@ -28,7 +28,7 @@ namespace CppSharp
public unsafe partial class ParserTargetInfo : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 176)]
public struct Internal
public partial struct Internal
{
[FieldOffset(24)]
public CppSharp.Parser.ParserIntType Char16Type;

2
src/CppParser/Bindings/premake4.lua

@ -27,7 +27,7 @@ project "CppSharp.Parser.CSharp" @@ -27,7 +27,7 @@ project "CppSharp.Parser.CSharp"
links { "CppSharp.Runtime" }
if os.is_windows() then
files { "CSharp/i686-pc-win32/**.cs" }
files { "CSharp/i686-pc-win32-msvc/**.cs" }
elseif os.is_osx() then
files { "CSharp/i686-apple-darwin12.4.0/**.cs" }
else

Loading…
Cancel
Save