Id's for Stmt-inherited classes

This commit is contained in:
Anton Mitrokhin
2015-07-09 14:45:33 +03:00
parent 26a93bc733
commit 8217448ee5
6 changed files with 82 additions and 36 deletions

View File

@@ -1905,8 +1905,7 @@ std::string emitOffloadParamStruct(const std::string &paramStructName,
if (!orgParamType->IsConstType()) {
Error(sym->pos,"When emitting offload-stubs, \"export\"ed functions cannot have non-const reference-type parameters.\n");
}
const ReferenceType *refType
= llvm::dyn_cast<const ReferenceType>(orgParamType);
const ReferenceType *refType = static_cast<const ReferenceType *>(orgParamType);
paramType = refType->GetReferenceTarget()->GetAsNonConstType();
} else {
paramType = orgParamType->GetAsNonConstType();
@@ -2024,8 +2023,7 @@ Module::writeDevStub(const char *fn)
if (!orgParamType->IsConstType()) {
Error(sym->pos,"When emitting offload-stubs, \"export\"ed functions cannot have non-const reference-type parameters.\n");
}
const ReferenceType *refType
= llvm::dyn_cast<const ReferenceType>(orgParamType);
const ReferenceType *refType = static_cast<const ReferenceType *>(orgParamType);
paramType = refType->GetReferenceTarget()->GetAsNonConstType();
} else {
paramType = orgParamType->GetAsNonConstType();