summaryrefslogtreecommitdiff
path: root/lib/AsmParser/LLLexer.cpp
diff options
context:
space:
mode:
authorMichael Ilseman <milseman@apple.com>2012-11-27 00:42:44 +0000
committerMichael Ilseman <milseman@apple.com>2012-11-27 00:42:44 +0000
commit15c13d3e63d7745bccad74d547af4e3482193eaa (patch)
tree7f27560aaf6fc5c3698d8a3a574545745350b98d /lib/AsmParser/LLLexer.cpp
parent4d265332341360a7cb5b15e2c2f0c675a7fed766 (diff)
downloadllvm-15c13d3e63d7745bccad74d547af4e3482193eaa.tar.gz
llvm-15c13d3e63d7745bccad74d547af4e3482193eaa.tar.bz2
llvm-15c13d3e63d7745bccad74d547af4e3482193eaa.tar.xz
Fast-math flags for LLVM IR parsing and printing
Added in the ability to read LLVM IR text that contains fast-math flags as a sequence of capital letters separated by spaces in any order. Added in the printing of the fast-math flags in a canonical order, and don't print the other flags when 'fast' is specified, as 'fast' implies all the others. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168645 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser/LLLexer.cpp')
-rw-r--r--lib/AsmParser/LLLexer.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/AsmParser/LLLexer.cpp b/lib/AsmParser/LLLexer.cpp
index d8ffe8fb73..eb176aefcb 100644
--- a/lib/AsmParser/LLLexer.cpp
+++ b/lib/AsmParser/LLLexer.cpp
@@ -402,7 +402,7 @@ lltok::Kind LLLexer::LexExclaim() {
}
return lltok::exclaim;
}
-
+
/// LexIdentifier: Handle several related productions:
/// Label [-a-zA-Z$._0-9]+:
/// IntegerType i[0-9]+
@@ -498,6 +498,11 @@ lltok::Kind LLLexer::LexIdentifier() {
KEYWORD(seq_cst);
KEYWORD(singlethread);
+ KEYWORD(nnan)
+ KEYWORD(ninf)
+ KEYWORD(nsz)
+ KEYWORD(arcp)
+ KEYWORD(fast)
KEYWORD(nuw);
KEYWORD(nsw);
KEYWORD(exact);