mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-12 02:43:14 +01:00
Added pure, safe and nothrow to gccbuiltins.
This commit is contained in:
@@ -57,6 +57,17 @@ string dtype(Record* rec)
|
||||
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)
|
||||
{
|
||||
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++)
|
||||
os << ", " << params[i];
|
||||
|
||||
os << ");\n\n";
|
||||
os << ")" + attributes(rec.getValueAsListInit("Properties")) + ";\n\n";
|
||||
}
|
||||
|
||||
std::string arch;
|
||||
|
||||
Reference in New Issue
Block a user