mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-14 07:09:50 +03:00
Added pure, safe and nothrow to gccbuiltins.
This commit is contained in:
parent
1423a9adb4
commit
021f067963
1 changed files with 12 additions and 1 deletions
|
@ -57,6 +57,17 @@ string dtype(Record* rec)
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string attributes(ListInit* propertyList)
|
||||||
|
{
|
||||||
|
string prop = propertyList->getSize() ?
|
||||||
|
propertyList->getElementAsRecord(0)->getName() : "";
|
||||||
|
|
||||||
|
return
|
||||||
|
prop == "IntrNoMem" ? "nothrow pure @safe" :
|
||||||
|
prop == "IntrReadArgMem" ? "nothrow pure" :
|
||||||
|
prop == "IntrReadWriteArgMem" ? "nothrow pure" : "nothrow";
|
||||||
|
}
|
||||||
|
|
||||||
void processRecord(raw_ostream& os, Record& rec, string arch)
|
void processRecord(raw_ostream& os, Record& rec, string arch)
|
||||||
{
|
{
|
||||||
if(!rec.getValue("GCCBuiltinName"))
|
if(!rec.getValue("GCCBuiltinName"))
|
||||||
|
@ -105,7 +116,7 @@ void processRecord(raw_ostream& os, Record& rec, string arch)
|
||||||
for(int i = 1; i < params.size(); i++)
|
for(int i = 1; i < params.size(); i++)
|
||||||
os << ", " << params[i];
|
os << ", " << params[i];
|
||||||
|
|
||||||
os << ");\n\n";
|
os << ")" + attributes(rec.getValueAsListInit("Properties")) + ";\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string arch;
|
std::string arch;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue