Dimitar Dobrev
cb6d2aee23
Fixed the generated C# when a template specialization with extensions is used for a secondary base.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
52c754c4de
Extended the multiple inheritance to work for templates.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
1e6c881bdc
Fixed a regression causing public fields of type specialization to be ignored.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
51c0f37aa3
Fixed the generated C# for templates with optional arguments.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
db3e04cca0
Represented "void" with "object" for template arguments in the generated C#.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
1a1308ad8a
Fixed the generated C# for public fields with type a dependent function pointer.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
c264690e90
Fixed the generated C# when a constructor has a default parameter with type an external specialisation.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
a96b2e2877
Set an index when marshalling the value in setters of properties.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
84f145b3e9
Fixed the generated C# when a function uses an external specialisation.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
fbd76adcb9
Fixed the generated C# when a base class is an external specialisation.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
a1327b4402
Fixed the generated C# for indexers with dependent keys.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
0ea147b1e3
Fixed the generated C# for templated indexers specialised with enums.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
8d0db5d341
Reverted a simplification because it caused a regression.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
6553084e95
Simplified the generation of default zeroes.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
João Matos
1743f7e051
Merge pull request #1024 from rokups/per-toolchain-llvm-packages
...
Add compiler/abi information to LLVM package names on linux.
8 years ago
Dimitar Dobrev
3dba1eb594
Exported entire specialisations when they only have valid functions.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
1ebf418e18
Considered dependent fields when generating internals for types nested in templates.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
93e4a41bec
Removed extensions for non-generated template specialisations.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
10607164ed
Fixed the generated C# when a template returns a specialisation with itself as a type arg.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
fceb204a98
Fixed the generated C# for members of types nested in templates.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
cdc2e73f84
Fixed the generated C# when a template is nested in another.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
573818f33e
Fixed a regression, a crash, when generating the parser bindings.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
1e80e8cf3c
Simplified the equalisation of access of overrides.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
45a9dc4c2f
Fixed a regression when a specialisation is mapped.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
João Matos
50fa937ba8
Merge pull request #1027 from rokups/feature/referenced-assemblies
...
Add ability for managed module wrapper to reference extra assemblies.
8 years ago
Rokas Kupstys
d7682ef6d4
Add ability for managed module wrapper to reference extra assemblies.
8 years ago
Rokas Kupstys
efc77924cc
Add compiler/abi information to LLVM package names on linux.
...
Compiler kind (always gcc for now) and version (4.8/4.9/5/6/7) is now always included in llvm package name. Additionally if `--no-cxx11-abi` flag is passed to premake then package name will end wiht "-no-cxx11".
Prebuilt LLVM binaries package for CI needs renaming to `llvm-9bde5f-linux-x64-gcc-4.8-Release.tar.xz`.
8 years ago
João Matos
1a73c126cf
Merge pull request #1022 from rokups/fixes
...
Multiple fixes
8 years ago
Rokas Kupstys
b90fb52525
Re-added linux include path that was removed by mistake.
8 years ago
Rokas Kupstys
944c9f4f7f
Enable debug information generation for all tests.
8 years ago
Rokas Kupstys
9ea1821cb3
Fix debug output not being generated when AST element had no comment.
...
Also debug text cleaning moved to CodeGenerator.cs and is done when printing bindings. New lines are not stripped out, instead each line is prepended with "// DEBUG: ". Now debug info is properly formatted, easy to read and full.
8 years ago
Rokas Kupstys
5a190bfb1b
Explicitly link to libstdc++ on linux.
...
In some environments using secondary installed compiler version does not link to libstdc++ automatically, which results in `DllNotFoundException`.
8 years ago
Rokas Kupstys
e5bc151c78
All arguments passed to `build/Compile.sh` are passed to premake.
...
Allows more fine-grained build customization when using this shellscript for compiling.
8 years ago
Rokas Kupstys
86f2c59ec5
Tweak linux include dirs, previous change broke GCC7 include dirs on archlinux.
8 years ago
Rokas Kupstys
7a3adcd401
Some linux distributions use `major.minor.patch` and some use `major.minor` for versioning include dirs. Add them all.
8 years ago
Rokas Kupstys
aa33609d45
Clean up linux includes setup.
...
Includes setup was moved to ParserOptions.cs and is used just like `SetupMSVC()` and `SetupXcode()`. Native compiler is queried for it's type and version. Correct include paths are set up in cases where system has multiple compilers installed as well.
8 years ago
Rokas Kupstys
4e735b5b61
Test for consistent struct/class keywords.
...
Tests for cases where class name matches translation unit name.
Tests for cases where global constants/functions from different translation units would end up in the value type.
8 years ago
Rokas Kupstys
0b99682341
Consistent class/struct keywords fixed for cases where wrapper class would contain members from several different translation units.
8 years ago
Rokas Kupstys
1165b3020e
Fix debug output breaking generated binding code.
8 years ago
Rokas Kupstys
e6c6346860
Completely remove `GenerateUnformatted()` method.
8 years ago
Rokas Kupstys
b47ecd59b4
CI: x64 builds on msvc and sudo requirement for travis
8 years ago
Rokas Kupstys
9c64e443f8
Always generate formatted code.
8 years ago
Rokas Kupstys
03f7f62e95
Fix `Delegates` namespace being not generated.
...
In some cases `Delegates` namespace could be attached to a namespace which is not wrapped and as a result of that `Delegates` namespace was also not generated in wrapper code resulting in a wrapper build errors. Change adds extra logic which tries to find the correct library namespace if more than one namespace is present.
8 years ago
Rokas Kupstys
555c51589e
Consistently declare classes/structs. Fixes issue where compilation error is produced due to file name containing constants matching class marked as value type.
8 years ago
Rokas Kupstys
e8e727d681
Fix linking to LLVM libs on linux, when system has llvm/clang installed. ( #1020 )
...
This change prevents premake from inserting /usr/lib64 search path on linux. GCC does not need this path specified compiler automatically knows where to look for system libs. Insertion of this path causes issues system has clang/llvm libs installed. Build would link to system libraries instead of custom required by CppSharp.
Also this patch revealed that linking to `pthread`, `z` and `tinfo` libraries on linux is not necessary and disabling them in LLVM build config works. Linking to these libs was removed. As you probably have guessed in the past CppSharp would throw `DllNotFoundException` due to missing symbols because it linked to system LLVM libs, not custom in-tree LLVM build.
8 years ago
João Matos
0805ab1798
Merge pull request #1019 from rokups/cxx11-on
...
Enable cxx11 abi for GCC 4.9+ on linux.
8 years ago
Rokas Kupstys
1cac2e0d78
Enable cxx11 abi for GCC 4.9+ on linux.
...
GCC version is checked, if version is 4.8 or lower then cxx11 ABI is disabled. Added new `--no-cxx11-abi` option. It explicitly disables cxx11 ABI even on new compilers. This option is also taken into account when building LLVM.
8 years ago
Dimitar Dobrev
3c55f7fb9e
Worked around a bug in the Mono C# compiler when casting generics.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
a097cdd437
Fixed a crash when the body of a templated function contains references to non-functions.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
João Matos
f8f11d2042
Merge pull request #1018 from rokups/fix-unpackaged-llvm-includes
...
Use correct LLVM build dir for includes from unpackaged LLVM builds
8 years ago