mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-13 14:47:00 +00:00
Parse and print opt_size note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55740 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cf996d4b56
commit
52e89dd4e2
@ -501,7 +501,7 @@ int LLLexer::LexIdentifier() {
|
||||
KEYWORD("inline", INLINE);
|
||||
KEYWORD("always", ALWAYS);
|
||||
KEYWORD("never", NEVER);
|
||||
KEYWORD("optimizeforsize", OPTIMIZEFORSIZE);
|
||||
KEYWORD("opt_size", OPTIMIZEFORSIZE);
|
||||
|
||||
KEYWORD("type", TYPE);
|
||||
KEYWORD("opaque", OPAQUE);
|
||||
|
@ -1398,10 +1398,19 @@ void AssemblyWriter::printFunction(const Function *F) {
|
||||
FunctionNotes FNotes = F->getNotes();
|
||||
if (FNotes != FN_NOTE_None) {
|
||||
Out << " notes(";
|
||||
if (FNotes & FN_NOTE_AlwaysInline)
|
||||
bool NeedComma = false;
|
||||
if (FNotes & FN_NOTE_AlwaysInline) {
|
||||
NeedComma = true;
|
||||
Out << "inline=always";
|
||||
else if (FNotes & FN_NOTE_NoInline)
|
||||
}
|
||||
else if (FNotes & FN_NOTE_NoInline) {
|
||||
NeedComma = true;
|
||||
Out << "inline=never";
|
||||
}
|
||||
if (NeedComma)
|
||||
Out << ",";
|
||||
if (FNotes & FN_NOTE_OptimizeForSize)
|
||||
Out << "opt_size";
|
||||
Out << ")";
|
||||
}
|
||||
if (F->isDeclaration()) {
|
||||
|
Loading…
Reference in New Issue
Block a user