- /* Now read the fragment data */
- switch (Frag->Type) {
-
- case FRAG_LITERAL:
- /* Literal data */
- ReadData (F, Frag->LitBuf, Frag->Size);
- break;
-
- case FRAG_EXPR:
- case FRAG_SEXPR:
- /* An expression */
- Frag->Expr = ReadExpr (F, O);
- break;
-
- }
-
- /* Read the file position of the fragment */
- ReadFilePos (F, &Frag->Pos);
-
- /* Read the additional line info and resolve it */
- LineInfoIndex = ReadVar (F);
- if (LineInfoIndex) {
- --LineInfoIndex;
- if (LineInfoIndex >= O->LineInfoCount) {
- Internal ("In module `%s', file `%s', line %lu: Invalid line "
- "info with index %u (max count %u)",
- GetObjFileName (O),
- GetSourceFileName (O, Frag->Pos.Name),
- Frag->Pos.Line, LineInfoIndex, O->LineInfoCount);
- }
- /* Point from the fragment to the line info... */
- Frag->LI = O->LineInfos[LineInfoIndex];
- /* ...and back from the line info to the fragment */
- CollAppend (&Frag->LI->Fragments, Frag);
- }
+ /* Read the line infos into the list of the fragment */
+ ReadLineInfoList (F, O, &Frag->LineInfos);