search for: parsetoken

Displaying 10 results from an estimated 10 matches for "parsetoken".

2010 Jan 18
5
[LLVMdev] [patch] Union Types - work in progress
...truct ConstantKeyData<ConstantUnion> { + typedef Constant* ValType; + static ValType getValType(ConstantUnion *CS) { CU not CS. LLParser.cpp: In LLParser::ParseUnionType, you can use SmallVector instead of std::vector for ParamsList & ParamsListTy. @@ -2135,7 +2173,8 @@ ParseToken(lltok::rparen, "expected ')' in extractvalue constantexpr")) return true; - if (!isa<StructType>(Val->getType()) && !isa<ArrayType>(Val- >getType())) + if (!isa<StructType>(Val->getType()) && !isa<ArrayType>(Val-...
2010 Jan 28
0
[LLVMdev] [patch] Union Types - work in progress
...edef Constant* ValType; > + static ValType getValType(ConstantUnion *CS) { > > CU not CS. > > > LLParser.cpp: > > In LLParser::ParseUnionType, you can use SmallVector instead of std::vector > for ParamsList & ParamsListTy. > > @@ -2135,7 +2173,8 @@ > ParseToken(lltok::rparen, "expected ')' in extractvalue > constantexpr")) > return true; > > - if (!isa<StructType>(Val->getType()) && > !isa<ArrayType>(Val->getType())) > + if (!isa<StructType>(Val->getType()) && >...
2010 Jan 28
0
[LLVMdev] [patch] Union Types - work in progress
...edef Constant* ValType; > + static ValType getValType(ConstantUnion *CS) { > > CU not CS. > > > LLParser.cpp: > > In LLParser::ParseUnionType, you can use SmallVector instead of std::vector > for ParamsList & ParamsListTy. > > @@ -2135,7 +2173,8 @@ > ParseToken(lltok::rparen, "expected ')' in extractvalue > constantexpr")) > return true; > > - if (!isa<StructType>(Val->getType()) && > !isa<ArrayType>(Val->getType())) > + if (!isa<StructType>(Val->getType()) && >...
2010 Jan 16
0
[LLVMdev] [patch] Union Types - work in progress
OK here's the patch for real this time :) On Fri, Jan 15, 2010 at 4:36 PM, Talin <viridia at gmail.com> wrote: > Here's a work in progress of the union patch. Note that the test "union.ll" > does not work, so you probably don't want to check this in as is. However, > I'd be interested in any feedback you're willing to give. > > -- > -- Talin
2010 Jan 16
2
[LLVMdev] [patch] Union Types - work in progress
Here's a work in progress of the union patch. Note that the test "union.ll" does not work, so you probably don't want to check this in as is. However, I'd be interested in any feedback you're willing to give. -- -- Talin -------------- next part -------------- An HTML attachment was scrubbed... URL:
2010 Feb 10
3
[LLVMdev] [patch] Union Types - work in progress
...pe getValType(ConstantUnion *CS) { >> >> CU not CS. >> >> >> LLParser.cpp: >> >> In LLParser::ParseUnionType, you can use SmallVector instead of >> std::vector for ParamsList & ParamsListTy. >> >> @@ -2135,7 +2173,8 @@ >> ParseToken(lltok::rparen, "expected ')' in extractvalue >> constantexpr")) >> return true; >> >> - if (!isa<StructType>(Val->getType()) && >> !isa<ArrayType>(Val->getType())) >> + if (!isa<StructType>(Val->get...
2010 Jan 09
0
[LLVMdev] [PATCH] - Union types, attempt 2
...t; Types.size(); ++i) { No need to evaluate Types.size() every time through the loop. +bool LLParser::ParseUnionType(PATypeHolder &Result) { ... + if (!EatIfPresent(lltok::lbrace)) { + return Error(EltTyLoc, "'{' expected after 'union'"); + } Please use: if (ParseToken(lltok::lbrace, "'{' expected after 'union'")) return true; + EltTyLoc = Lex.getLoc(); + if (ParseTypeRec(Result)) return true; + ParamsList.push_back(Result); + + if (Result->isVoidTy()) + return Error(EltTyLoc, "union element can not have void type")...
2010 Jan 06
3
[LLVMdev] [PATCH] - Union types, attempt 2
This patch adds a UnionType to DerivedTypes.h. It also adds code to the bitcode reader / writer and the assembly parser for the new type, as well as a tiny .ll test file in test/Assembler. It does not contain any code related to code generation or type layout - I wanted to see if this much was acceptable before I proceeded any further. Unlike my previous patch, in which the Union type was
2010 Jan 11
2
[LLVMdev] [PATCH] - Union types, attempt 2
...pes.size() every time through the loop. > > > +bool LLParser::ParseUnionType(PATypeHolder &Result) { > ... > + if (!EatIfPresent(lltok::lbrace)) { > + return Error(EltTyLoc, "'{' expected after 'union'"); > + } > > Please use: > if (ParseToken(lltok::lbrace, "'{' expected after 'union'")) return true; > > > + EltTyLoc = Lex.getLoc(); > + if (ParseTypeRec(Result)) return true; > + ParamsList.push_back(Result); > + > + if (Result->isVoidTy()) > + return Error(EltTyLoc, "union...
2014 Mar 07
3
[LLVMdev] [RFC] Add second "failure" AtomicOrdering to cmpxchg instruction
...rdering = NotAtomic; + AtomicOrdering FailureOrdering = NotAtomic; SynchronizationScope Scope = CrossThread; bool isVolatile = false; @@ -4214,11 +4223,16 @@ int LLParser::ParseCmpXchg(Instruction *&Inst, PerFunctionState &PFS) { ParseTypeAndValue(Cmp, CmpLoc, PFS) || ParseToken(lltok::comma, "expected ',' after cmpxchg cmp operand") || ParseTypeAndValue(New, NewLoc, PFS) || - ParseScopeAndOrdering(true /*Always atomic*/, Scope, Ordering)) + ParseScopeAndOrdering(true /*Always atomic*/, Scope, SuccessOrdering) || + ParseOrdering(Fail...