forked from OSchip/llvm-project
parent
0ff4192f3a
commit
3771a1281f
|
@ -501,7 +501,7 @@ int LLLexer::LexIdentifier() {
|
||||||
KEYWORD("inline", INLINE);
|
KEYWORD("inline", INLINE);
|
||||||
KEYWORD("always", ALWAYS);
|
KEYWORD("always", ALWAYS);
|
||||||
KEYWORD("never", NEVER);
|
KEYWORD("never", NEVER);
|
||||||
KEYWORD("optimizeforsize", OPTIMIZEFORSIZE);
|
KEYWORD("opt_size", OPTIMIZEFORSIZE);
|
||||||
|
|
||||||
KEYWORD("type", TYPE);
|
KEYWORD("type", TYPE);
|
||||||
KEYWORD("opaque", OPAQUE);
|
KEYWORD("opaque", OPAQUE);
|
||||||
|
|
|
@ -1398,10 +1398,19 @@ void AssemblyWriter::printFunction(const Function *F) {
|
||||||
FunctionNotes FNotes = F->getNotes();
|
FunctionNotes FNotes = F->getNotes();
|
||||||
if (FNotes != FN_NOTE_None) {
|
if (FNotes != FN_NOTE_None) {
|
||||||
Out << " notes(";
|
Out << " notes(";
|
||||||
if (FNotes & FN_NOTE_AlwaysInline)
|
bool NeedComma = false;
|
||||||
|
if (FNotes & FN_NOTE_AlwaysInline) {
|
||||||
|
NeedComma = true;
|
||||||
Out << "inline=always";
|
Out << "inline=always";
|
||||||
else if (FNotes & FN_NOTE_NoInline)
|
}
|
||||||
|
else if (FNotes & FN_NOTE_NoInline) {
|
||||||
|
NeedComma = true;
|
||||||
Out << "inline=never";
|
Out << "inline=never";
|
||||||
|
}
|
||||||
|
if (NeedComma)
|
||||||
|
Out << ",";
|
||||||
|
if (FNotes & FN_NOTE_OptimizeForSize)
|
||||||
|
Out << "opt_size";
|
||||||
Out << ")";
|
Out << ")";
|
||||||
}
|
}
|
||||||
if (F->isDeclaration()) {
|
if (F->isDeclaration()) {
|
||||||
|
|
Loading…
Reference in New Issue