Displaying 3 results from an estimated 3 matches for "parsetyperec".
2010 Jan 09
0
[LLVMdev] [PATCH] - Union types, attempt 2
...&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");
+ if (!UnionType::isValidElementType(Result))
+ return Error(EltTyLoc, "invalid element type for union");
+
+ while (E...
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
...tok::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");
> + if (!UnionType::isValidElementType(Result))
> + return Error(EltTyLoc, "invalid element type f...