aboutsummaryrefslogtreecommitdiffstats
path: root/lib/AsmParser
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2009-07-01 22:33:26 +0000
committerBill Wendling <isanbard@gmail.com>2009-07-01 22:33:26 +0000
commitaa3943bf63618dce1a74eda1a81bcee7ee9c73f5 (patch)
tree37ef0a94a84f42b89891615fc6a793fbd983c14a /lib/AsmParser
parent7136a6540cce99a9498ffaf4ebab26e7f6ae5b50 (diff)
downloadexternal_llvm-aa3943bf63618dce1a74eda1a81bcee7ee9c73f5.zip
external_llvm-aa3943bf63618dce1a74eda1a81bcee7ee9c73f5.tar.gz
external_llvm-aa3943bf63618dce1a74eda1a81bcee7ee9c73f5.tar.bz2
--- Reverse-merging (from foreign repository) r74648 into '.':
U include/llvm/LLVMContext.h U lib/VMCore/LLVMContext.cpp U lib/AsmParser/LLParser.cpp U lib/AsmParser/LLParser.h Temporarily reverting r74648. It was causing massive failures in release mode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74653 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser')
-rw-r--r--lib/AsmParser/LLParser.cpp7
-rw-r--r--lib/AsmParser/LLParser.h7
2 files changed, 5 insertions, 9 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp
index 011d113..4ab0f26 100644
--- a/lib/AsmParser/LLParser.cpp
+++ b/lib/AsmParser/LLParser.cpp
@@ -18,7 +18,6 @@
#include "llvm/DerivedTypes.h"
#include "llvm/InlineAsm.h"
#include "llvm/Instructions.h"
-#include "llvm/LLVMContext.h"
#include "llvm/MDNode.h"
#include "llvm/Module.h"
#include "llvm/ValueSymbolTable.h"
@@ -1654,11 +1653,11 @@ bool LLParser::ParseValID(ValID &ID) {
ID.Kind = ValID::t_APFloat;
break;
case lltok::kw_true:
- ID.ConstantVal = Context.getConstantIntTrue();
+ ID.ConstantVal = ConstantInt::getTrue();
ID.Kind = ValID::t_Constant;
break;
case lltok::kw_false:
- ID.ConstantVal = Context.getConstantIntFalse();
+ ID.ConstantVal = ConstantInt::getFalse();
ID.Kind = ValID::t_Constant;
break;
case lltok::kw_null: ID.Kind = ValID::t_Null; break;
@@ -2038,7 +2037,7 @@ bool LLParser::ConvertGlobalValIDToValue(const Type *Ty, ValID &ID,
if (!isa<IntegerType>(Ty))
return Error(ID.Loc, "integer constant must have integer type");
ID.APSIntVal.extOrTrunc(Ty->getPrimitiveSizeInBits());
- V = Context.getConstantInt(ID.APSIntVal);
+ V = ConstantInt::get(ID.APSIntVal);
return false;
case ValID::t_APFloat:
if (!Ty->isFloatingPoint() ||
diff --git a/lib/AsmParser/LLParser.h b/lib/AsmParser/LLParser.h
index 924c929..41c2ee7 100644
--- a/lib/AsmParser/LLParser.h
+++ b/lib/AsmParser/LLParser.h
@@ -15,7 +15,6 @@
#define LLVM_ASMPARSER_LLPARSER_H
#include "LLLexer.h"
-#include "llvm/Module.h"
#include "llvm/Type.h"
#include <map>
@@ -30,14 +29,13 @@ namespace llvm {
class GlobalValue;
class MDString;
class MDNode;
- class LLVMContext;
struct ValID;
class LLParser {
public:
typedef LLLexer::LocTy LocTy;
private:
- const LLVMContext& Context;
+
LLLexer Lex;
Module *M;
@@ -74,8 +72,7 @@ namespace llvm {
std::map<unsigned, std::pair<GlobalValue*, LocTy> > ForwardRefValIDs;
std::vector<GlobalValue*> NumberedVals;
public:
- LLParser(MemoryBuffer *F, ParseError &Err, Module *m) :
- Context(M->getContext()), Lex(F, Err), M(m) {}
+ LLParser(MemoryBuffer *F, ParseError &Err, Module *m) : Lex(F, Err), M(m) {}
bool Run();
private: