Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/trunk/lib/AsmParser/LLParser.cpp
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 4,222 Lines • ▼ Show 20 Lines | do { \ | ||||
}, ClosingLoc)) \ | }, ClosingLoc)) \ | ||||
return true; \ | return true; \ | ||||
VISIT_MD_FIELDS(NOP_FIELD, REQUIRE_FIELD) \ | VISIT_MD_FIELDS(NOP_FIELD, REQUIRE_FIELD) \ | ||||
} while (false) | } while (false) | ||||
#define GET_OR_DISTINCT(CLASS, ARGS) \ | #define GET_OR_DISTINCT(CLASS, ARGS) \ | ||||
(IsDistinct ? CLASS::getDistinct ARGS : CLASS::get ARGS) | (IsDistinct ? CLASS::getDistinct ARGS : CLASS::get ARGS) | ||||
/// ParseDILocationFields: | /// ParseDILocationFields: | ||||
/// ::= !DILocation(line: 43, column: 8, scope: !5, inlinedAt: !6) | /// ::= !DILocation(line: 43, column: 8, scope: !5, inlinedAt: !6, | ||||
/// isImplicitCode: true) | |||||
bool LLParser::ParseDILocation(MDNode *&Result, bool IsDistinct) { | bool LLParser::ParseDILocation(MDNode *&Result, bool IsDistinct) { | ||||
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED) \ | #define VISIT_MD_FIELDS(OPTIONAL, REQUIRED) \ | ||||
OPTIONAL(line, LineField, ); \ | OPTIONAL(line, LineField, ); \ | ||||
OPTIONAL(column, ColumnField, ); \ | OPTIONAL(column, ColumnField, ); \ | ||||
REQUIRED(scope, MDField, (/* AllowNull */ false)); \ | REQUIRED(scope, MDField, (/* AllowNull */ false)); \ | ||||
OPTIONAL(inlinedAt, MDField, ); | OPTIONAL(inlinedAt, MDField, ); \ | ||||
OPTIONAL(isImplicitCode, MDBoolField, (false)); | |||||
PARSE_MD_FIELDS(); | PARSE_MD_FIELDS(); | ||||
#undef VISIT_MD_FIELDS | #undef VISIT_MD_FIELDS | ||||
Result = GET_OR_DISTINCT( | Result = | ||||
DILocation, (Context, line.Val, column.Val, scope.Val, inlinedAt.Val)); | GET_OR_DISTINCT(DILocation, (Context, line.Val, column.Val, scope.Val, | ||||
inlinedAt.Val, isImplicitCode.Val)); | |||||
return false; | return false; | ||||
} | } | ||||
/// ParseGenericDINode: | /// ParseGenericDINode: | ||||
/// ::= !GenericDINode(tag: 15, header: "...", operands: {...}) | /// ::= !GenericDINode(tag: 15, header: "...", operands: {...}) | ||||
bool LLParser::ParseGenericDINode(MDNode *&Result, bool IsDistinct) { | bool LLParser::ParseGenericDINode(MDNode *&Result, bool IsDistinct) { | ||||
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED) \ | #define VISIT_MD_FIELDS(OPTIONAL, REQUIRED) \ | ||||
REQUIRED(tag, DwarfTagField, ); \ | REQUIRED(tag, DwarfTagField, ); \ | ||||
▲ Show 20 Lines • Show All 3,948 Lines • Show Last 20 Lines |