Sort includes for all of the .h files under the 'lib' tree. These were
[oota-llvm.git] / lib / AsmParser / LLParser.h
index 9f9672d67b5bf2814ea3e0a773ae92229b68ad1b..b4cc12b28b02319d979dbcfcef8dde06bda6255d 100644 (file)
 #define LLVM_ASMPARSER_LLPARSER_H
 
 #include "LLLexer.h"
+#include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/StringMap.h"
 #include "llvm/Attributes.h"
 #include "llvm/Instructions.h"
 #include "llvm/Module.h"
-#include "llvm/Type.h"
-#include "llvm/ADT/DenseMap.h"
-#include "llvm/ADT/StringMap.h"
+#include "llvm/Operator.h"
 #include "llvm/Support/ValueHandle.h"
+#include "llvm/Type.h"
 #include <map>
 
 namespace llvm {
@@ -154,6 +155,21 @@ namespace llvm {
       Lex.Lex();
       return true;
     }
+
+    FastMathFlags EatFastMathFlagsIfPresent() {
+      FastMathFlags FMF;
+      while (true)
+        switch (Lex.getKind()) {
+        case lltok::kw_fast: FMF.UnsafeAlgebra   = true; Lex.Lex(); continue;
+        case lltok::kw_nnan: FMF.NoNaNs          = true; Lex.Lex(); continue;
+        case lltok::kw_ninf: FMF.NoInfs          = true; Lex.Lex(); continue;
+        case lltok::kw_nsz:  FMF.NoSignedZeros   = true; Lex.Lex(); continue;
+        case lltok::kw_arcp: FMF.AllowReciprocal = true; Lex.Lex(); continue;
+        default: return FMF;
+        }
+      return FMF;
+    }
+
     bool ParseOptionalToken(lltok::Kind T, bool &Present, LocTy *Loc = 0) {
       if (Lex.getKind() != T) {
         Present = false;
@@ -200,8 +216,8 @@ namespace llvm {
     bool ParseTopLevelEntities();
     bool ValidateEndOfModule();
     bool ParseTargetDefinition();
-    bool ParseDepLibs();
     bool ParseModuleAsm();
+    bool ParseDepLibs();        // FIXME: Remove in 4.0.
     bool ParseUnnamedType();
     bool ParseNamedType();
     bool ParseDeclare();