зеркало из https://github.com/dotnet/llilc.git
Merge pull request #454 from erozenfeld/FixesForRoslyn
Fix and workarounds for Roslyn.
This commit is contained in:
Коммит
abb614c73b
|
@ -334,14 +334,17 @@ bool LLILCJit::readMethod(LLILCJitContext *JitContext) {
|
|||
Function *Func = JitContext->CurrentModule->getFunction(FuncName);
|
||||
bool IsOk = !verifyFunction(*Func, &dbgs());
|
||||
|
||||
assert(IsOk);
|
||||
|
||||
if (IsOk) {
|
||||
if (DumpLevel >= SUMMARY) {
|
||||
errs() << "Successfully read " << FuncName << '\n';
|
||||
}
|
||||
} else {
|
||||
if (DumpLevel >= SUMMARY) {
|
||||
errs() << "Read " << FuncName << " but failed verification\n";
|
||||
errs() << "Failed to read " << FuncName << "[verification error]\n";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if (DumpLevel == VERBOSE) {
|
||||
|
|
|
@ -1761,6 +1761,9 @@ IRNode *GenIR::convertFromStackType(IRNode *Node, CorInfoType CorType,
|
|||
}
|
||||
|
||||
case Type::TypeID::StructTyID:
|
||||
if (Ty != ResultTy) {
|
||||
throw NotYetImplementedException("mismatching struct types");
|
||||
}
|
||||
ASSERT(Ty == ResultTy);
|
||||
// No conversions possible/necessary.
|
||||
break;
|
||||
|
@ -2561,7 +2564,7 @@ IRNode *GenIR::simpleFieldAddress(IRNode *BaseAddress,
|
|||
// Double-check that the field index is sensible. Note
|
||||
// in unverifiable IL we may not have proper referent types and
|
||||
// so may see what appear to be unrelated field accesses.
|
||||
if (BaseObjStructTy->getNumElements() >= FieldIndex) {
|
||||
if (BaseObjStructTy->getNumElements() > FieldIndex) {
|
||||
const DataLayout *DataLayout = JitContext->EE->getDataLayout();
|
||||
const StructLayout *StructLayout =
|
||||
DataLayout->getStructLayout(BaseObjStructTy);
|
||||
|
@ -5570,6 +5573,11 @@ Type *GenIR::getStackMergeType(Type *Ty1, Type *Ty2) {
|
|||
}
|
||||
return getType(CORINFO_TYPE_CLASS, MergedClass);
|
||||
}
|
||||
|
||||
if (Ty1->isStructTy() && Ty2->isStructTy()) {
|
||||
throw NotYetImplementedException("mismatching PHI struct types");
|
||||
}
|
||||
|
||||
ASSERT(UNREACHED);
|
||||
return nullptr;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче