mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-16 12:53:14 +01:00
[svn r256] AsmBlockStatement was still being flattened in some cases.
Function parameters passed as arguments to inline asm was not given storage.
This commit is contained in:
@@ -245,7 +245,6 @@ AsmStatement::toIR(IRState * irs)
|
||||
|
||||
static std::string i_cns = "i";
|
||||
static std::string p_cns = "i";
|
||||
static std::string l_cns = "X";
|
||||
static std::string m_cns = "*m";
|
||||
static std::string mw_cns = "=*m";
|
||||
static std::string mrw_cns = "+*m";
|
||||
@@ -497,6 +496,7 @@ void AsmBlockStatement::toIR(IRState* p)
|
||||
// create asm block structure
|
||||
assert(!p->asmBlock);
|
||||
IRAsmBlock* asmblock = new IRAsmBlock;
|
||||
assert(asmblock);
|
||||
p->asmBlock = asmblock;
|
||||
|
||||
// do asm statements
|
||||
@@ -595,3 +595,18 @@ Statements* AsmBlockStatement::flatten(Scope* sc)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Statement *AsmBlockStatement::syntaxCopy()
|
||||
{
|
||||
Statements *a = new Statements();
|
||||
a->setDim(statements->dim);
|
||||
for (size_t i = 0; i < statements->dim; i++)
|
||||
{
|
||||
Statement *s = (Statement *)statements->data[i];
|
||||
if (s)
|
||||
s = s->syntaxCopy();
|
||||
a->data[i] = s;
|
||||
}
|
||||
AsmBlockStatement *cs = new AsmBlockStatement(loc, a);
|
||||
return cs;
|
||||
}
|
||||
Reference in New Issue
Block a user