diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2017-09-27 11:17:39 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-09-27 11:17:39 -0700 |
| commit | 74f2f47cb63b02638270beecd20acea1a0f5665e (patch) | |
| tree | af50d0355c7fccb4fb93fc1a0d45c66b5d07f1c9 /source/slang/lower-to-ir.cpp | |
| parent | b6cf0f4ae0f3f9d1f377d3f134dcf994676e68b4 (diff) | |
First attempt at a Linux build (#193)
* First attempt at a Linux build
- Fix up places where C++ idioms were written assuming lenient behavior of Microsoft's compiler
- Add a few more alternatives for platform-specific behavior where Windows was the only platform accounted for.
- Add a basic Makefile that can at least invoke our build, even if it isn't going good dependency tracking, etc.
- Build `libslang.so` and `slangc` that depends on it, using a relative `RPATH` to make the binary portable (I hope)
- Add an initial `.travis.yml` to see if we can trigger their build process.
* Fixup: const bug in `List::Sort`
I'm not clear why this gets picked up by the gcc *and* clang that Travis uses, but not the (newer) gcc I'm using on Ubuntu here, but I'm hoping it is just some missing `const` qualifiers.
* Fixup: reorder specialization of "class info"
Clang complains about things being specialized after being instantiated (implicilty), and I hope it is just the fact that I generate the class info for the roots of the hierarchy after the other cases. We'll see.
* Fixup: add `platform.cpp` to unified/lumped build
* Fixup: Windows uses `FreeLibrary`
and not `UnloadLibrary`
* Fixup: fix Windows project file to include new source file
This obviously points to the fact that we are going to need to be generating these files sooner or later.
Diffstat (limited to 'source/slang/lower-to-ir.cpp')
| -rw-r--r-- | source/slang/lower-to-ir.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/slang/lower-to-ir.cpp b/source/slang/lower-to-ir.cpp index 464d5d50a..06ad66bc4 100644 --- a/source/slang/lower-to-ir.cpp +++ b/source/slang/lower-to-ir.cpp @@ -836,7 +836,7 @@ struct ValLoweringVisitor : ValVisitor<ValLoweringVisitor, LoweredValInfo, Lower LoweredTypeInfo visitBasicExpressionType(BasicExpressionType* type) { - return getBuilder()->getBaseType(type->BaseType); + return getBuilder()->getBaseType(type->baseType); } LoweredTypeInfo visitVectorExpressionType(VectorExpressionType* type) @@ -876,7 +876,7 @@ struct ValLoweringVisitor : ValVisitor<ValLoweringVisitor, LoweredValInfo, Lower LoweredTypeInfo visitArrayExpressionType(ArrayExpressionType* type) { - auto loweredElementType = lowerType(context, type->BaseType); + auto loweredElementType = lowerType(context, type->baseType); if (auto elementCount = type->ArrayLength) { auto irElementCount = lowerSimpleVal(context, elementCount); @@ -984,7 +984,7 @@ struct ExprLoweringVisitorBase : ExprVisitor<Derived, LoweredValInfo> // as the visitor itself. LoweredValInfo lowerSubExpr(Expr* expr) { - return dispatch(expr); + return this->dispatch(expr); } @@ -2306,7 +2306,8 @@ struct DeclLoweringVisitor : DeclVisitor<DeclLoweringVisitor, LoweredValInfo> template<typename D> DeclRef<D> createDefaultSpecializedDeclRef(D* decl) { - return createDefaultSpecializedDeclRefImpl(decl).As<D>(); + DeclRef<Decl> declRef = createDefaultSpecializedDeclRefImpl(decl); + return declRef.As<D>(); } |
