From 15fd67be0344b25a7b499686a1dc42845702ce63 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Sat, 11 May 2013 20:18:34 +0200 Subject: [PATCH] Remove code for unimplemented goto-into-asm check. The check was never fully implemented. We need to look into this again, as currently we fail with a fairly unintellegible LLVM ICE (added as GitHub #). --- dmd2/statement.c | 3 --- dmd2/statement.h | 1 - gen/llvmhelpers.cpp | 6 ------ 3 files changed, 10 deletions(-) diff --git a/dmd2/statement.c b/dmd2/statement.c index 463363ca..96034062 100644 --- a/dmd2/statement.c +++ b/dmd2/statement.c @@ -5509,9 +5509,6 @@ LabelStatement::LabelStatement(Loc loc, Identifier *ident, Statement *statement) #endif this->lblock = NULL; this->fwdrefs = NULL; -#if IN_LLVM - this->asmLabel = false; -#endif } Statement *LabelStatement::syntaxCopy() diff --git a/dmd2/statement.h b/dmd2/statement.h index 4ff0ddee..7c9766d1 100644 --- a/dmd2/statement.h +++ b/dmd2/statement.h @@ -943,7 +943,6 @@ struct LabelStatement : Statement void toIR(IRState *irs); #if IN_LLVM - bool asmLabel; // for labels inside inline assembler void toNakedIR(IRState *irs); #endif }; diff --git a/gen/llvmhelpers.cpp b/gen/llvmhelpers.cpp index 76f64787..90546920 100644 --- a/gen/llvmhelpers.cpp +++ b/gen/llvmhelpers.cpp @@ -232,12 +232,6 @@ void DtoGoto(Loc loc, Identifier* target, TryFinallyStatement* sourceFinally) fatal(); } - // if the target label is inside inline asm, error - if(lblstmt->asmLabel) { - error(loc, "cannot goto to label %s inside an inline asm block", target->toChars()); - fatal(); - } - // find target basic block std::string labelname = gIR->func()->gen->getScopedLabelName(target->toChars()); llvm::BasicBlock*& targetBB = gIR->func()->gen->labelToBB[labelname];