forked from qt-creator/qt-creator
Clang: clean up unit handling.
- Use a QSharedPointer instead of an explicitly shared pointer. - Remove the LiveUnitManager. Change-Id: I05bf32c1f77c17f42ee1da39f1353cff580fa6eb Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
committed by
Nikolai Kosjar
parent
2251958375
commit
a4b6e35ac4
@@ -48,16 +48,16 @@ QPair<bool, QStringList> precompile(const PchInfo::Ptr &pchInfo)
|
||||
|
||||
bool ok = false;
|
||||
|
||||
Internal::Unit unit(pchInfo->inputFileName());
|
||||
unit.setCompilationOptions(pchInfo->options());
|
||||
Internal::Unit::Ptr unit = Internal::Unit::create(pchInfo->inputFileName());
|
||||
unit->setCompilationOptions(pchInfo->options());
|
||||
|
||||
unsigned parseOpts = CXTranslationUnit_ForSerialization
|
||||
| CXTranslationUnit_Incomplete;
|
||||
unit.setManagementOptions(parseOpts);
|
||||
unit->setManagementOptions(parseOpts);
|
||||
|
||||
unit.parse();
|
||||
if (unit.isLoaded())
|
||||
ok = CXSaveError_None == unit.save(pchInfo->fileName());
|
||||
unit->parse();
|
||||
if (unit->isLoaded())
|
||||
ok = CXSaveError_None == unit->save(pchInfo->fileName());
|
||||
|
||||
return qMakePair(ok, Internal::formattedDiagnostics(unit));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user