/// getLineTableFilenameID - Return the uniqued ID for the specified filename.
///
unsigned SourceManager::getLineTableFilenameID(StringRef Name) {
- if (!LineTable)
- LineTable = new LineTableInfo();
- return LineTable->getLineTableFilenameID(Name);
+ return getLineTable().getLineTableFilenameID(Name);
}
// Remember that this file has #line directives now if it doesn't already.
const_cast<SrcMgr::FileInfo&>(FileInfo).setHasLineDirectives();
- if (!LineTable)
- LineTable = new LineTableInfo();
- LineTable->AddLineNote(LocInfo.first, LocInfo.second, LineNo, FilenameID);
+ getLineTable().AddLineNote(LocInfo.first, LocInfo.second, LineNo, FilenameID);
}
/// AddLineNote - Add a GNU line marker to the line table.
// Remember that this file has #line directives now if it doesn't already.
const_cast<SrcMgr::FileInfo&>(FileInfo).setHasLineDirectives();
- if (!LineTable)
- LineTable = new LineTableInfo();
+ (void) getLineTable();
SrcMgr::CharacteristicKind FileKind;
if (IsExternCHeader)