Fix some compiler warnings.
Change-Id: I5e2c87581d4c309490f12accfff32418700fbb71 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
This commit is contained in:
parent
f5b31970de
commit
65357da128
2
main.cpp
2
main.cpp
|
@ -159,7 +159,7 @@ int executeLLVMCode(void *codePtr)
|
||||||
void (*code)(VM::ExecutionContext *) = (void (*)(VM::ExecutionContext *)) codePtr;
|
void (*code)(VM::ExecutionContext *) = (void (*)(VM::ExecutionContext *)) codePtr;
|
||||||
|
|
||||||
QScopedPointer<QQmlJS::EvalISelFactory> iSelFactory(new QQmlJS::Moth::ISelFactory);
|
QScopedPointer<QQmlJS::EvalISelFactory> iSelFactory(new QQmlJS::Moth::ISelFactory);
|
||||||
VM::ExecutionEngine vm(0, iSelFactory.data());
|
VM::ExecutionEngine vm(iSelFactory.data());
|
||||||
VM::ExecutionContext *ctx = vm.rootContext;
|
VM::ExecutionContext *ctx = vm.rootContext;
|
||||||
|
|
||||||
QQmlJS::VM::Object *globalObject = vm.globalObject.objectValue();
|
QQmlJS::VM::Object *globalObject = vm.globalObject.objectValue();
|
||||||
|
|
|
@ -125,8 +125,8 @@ struct Value
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inline ValueType type() const {
|
inline unsigned type() const {
|
||||||
return (ValueType)(tag & Type_Mask);
|
return tag & Type_Mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool isUndefined() const { return tag == _Undefined_Type; }
|
inline bool isUndefined() const { return tag == _Undefined_Type; }
|
||||||
|
|
|
@ -165,7 +165,7 @@ Managed *MemoryManager::alloc(std::size_t size)
|
||||||
void MemoryManager::scribble(Managed *obj, int c, int size) const
|
void MemoryManager::scribble(Managed *obj, int c, int size) const
|
||||||
{
|
{
|
||||||
if (m_d->scribble)
|
if (m_d->scribble)
|
||||||
::memset(obj + 1, c, size - sizeof(Managed));
|
::memset((void *)(obj + 1), c, size - sizeof(Managed));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::size_t MemoryManager::mark(const QVector<Object *> &objects)
|
std::size_t MemoryManager::mark(const QVector<Object *> &objects)
|
||||||
|
|
3
v4.pro
3
v4.pro
|
@ -64,6 +64,8 @@ INCLUDEPATH += \
|
||||||
$$system($$LLVM_CONFIG --includedir)
|
$$system($$LLVM_CONFIG --includedir)
|
||||||
|
|
||||||
QMAKE_CXXFLAGS += $$system($$LLVM_CONFIG --cppflags) -fvisibility-inlines-hidden
|
QMAKE_CXXFLAGS += $$system($$LLVM_CONFIG --cppflags) -fvisibility-inlines-hidden
|
||||||
|
QMAKE_CXXFLAGS -= -pedantic
|
||||||
|
QMAKE_CXXFLAGS -= -Wcovered-switch-default
|
||||||
|
|
||||||
LIBS += \
|
LIBS += \
|
||||||
$$system($$LLVM_CONFIG --ldflags) \
|
$$system($$LLVM_CONFIG --ldflags) \
|
||||||
|
@ -72,6 +74,7 @@ LIBS += \
|
||||||
QMAKE_EXTRA_TARGETS += gen_llvm_runtime
|
QMAKE_EXTRA_TARGETS += gen_llvm_runtime
|
||||||
|
|
||||||
GEN_LLVM_RUNTIME_FLAGS = $$system($$LLVM_CONFIG --cppflags)
|
GEN_LLVM_RUNTIME_FLAGS = $$system($$LLVM_CONFIG --cppflags)
|
||||||
|
GEN_LLVM_RUNTIME_FLAGS -= -pedantic
|
||||||
|
|
||||||
gen_llvm_runtime.target = llvm_runtime
|
gen_llvm_runtime.target = llvm_runtime
|
||||||
gen_llvm_runtime.commands = clang -O2 -emit-llvm -c $(INCPATH) $$GEN_LLVM_RUNTIME_FLAGS -DQMLJS_LLVM_RUNTIME llvm_runtime.cpp -o llvm_runtime.bc
|
gen_llvm_runtime.commands = clang -O2 -emit-llvm -c $(INCPATH) $$GEN_LLVM_RUNTIME_FLAGS -DQMLJS_LLVM_RUNTIME llvm_runtime.cpp -o llvm_runtime.bc
|
||||||
|
|
Loading…
Reference in New Issue