#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 {
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;
bool ParseTopLevelEntities();
bool ValidateEndOfModule();
bool ParseTargetDefinition();
- bool ParseDepLibs();
bool ParseModuleAsm();
+ bool ParseDepLibs(); // FIXME: Remove in 4.0.
bool ParseUnnamedType();
bool ParseNamedType();
bool ParseDeclare();