Changeset 2f9768f for src/SymTab
- Timestamp:
- Aug 19, 2018, 10:56:12 AM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- 38587bc
- Parents:
- 90ed538
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Demangle.cc
r90ed538 r2f9768f 350 350 Type * parseVoid(Type::Qualifiers tq); 351 351 Type * parsePointer(Type::Qualifiers tq); 352 Type * parseArray(Type::Qualifiers tq); 352 353 Type * parseStruct(Type::Qualifiers tq); 353 354 … … 368 369 parsers.emplace_back(Encoding::function, [this](Type::Qualifiers tq) { return parseFunction(tq); }); 369 370 parsers.emplace_back(Encoding::pointer, [this](Type::Qualifiers tq) { return parsePointer(tq); }); 371 parsers.emplace_back(Encoding::array, [this](Type::Qualifiers tq) { return parseArray(tq); }); 370 372 parsers.emplace_back(Encoding::tuple, [this](Type::Qualifiers tq) { return parseTuple(tq); }); 371 373 parsers.emplace_back(Encoding::struct_t, [this](Type::Qualifiers tq) { return parseStruct(tq); }); … … 475 477 } 476 478 479 Type * StringView::parseArray(Type::Qualifiers tq) { 480 PRINT( std::cerr << "array..." << std::endl; ) 481 size_t length; 482 if (! extractNumber(length)) return nullptr; 483 Type * t = parseType(); 484 if (! t) return nullptr; 485 return new ArrayType( tq, t, new ConstantExpr( Constant::from_ulong(length) ), false, false ); 486 } 487 477 488 Type * StringView::parseStruct(Type::Qualifiers tq) { 478 489 PRINT( std::cerr << "struct..." << std::endl; )
Note: See TracChangeset
for help on using the changeset viewer.