зеркало из https://github.com/microsoft/clang-1.git
Micro cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54477 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
29da6c59df
Коммит
7a08e289b2
|
@ -1422,7 +1422,8 @@ int main(int argc, char **argv) {
|
|||
|
||||
// Get information about the target being compiled for.
|
||||
std::string Triple = CreateTargetTriple();
|
||||
TargetInfo *Target = TargetInfo::CreateTargetInfo(Triple);
|
||||
llvm::OwningPtr<TargetInfo> Target(TargetInfo::CreateTargetInfo(Triple));
|
||||
|
||||
if (Target == 0) {
|
||||
fprintf(stderr, "Sorry, I don't know what target this is: %s\n",
|
||||
Triple.c_str());
|
||||
|
@ -1500,12 +1501,7 @@ int main(int argc, char **argv) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
delete Target;
|
||||
|
||||
unsigned NumDiagnostics = Diags.getNumDiagnostics();
|
||||
|
||||
if (NumDiagnostics)
|
||||
if (unsigned NumDiagnostics = Diags.getNumDiagnostics())
|
||||
fprintf(stderr, "%d diagnostic%s generated.\n", NumDiagnostics,
|
||||
(NumDiagnostics == 1 ? "" : "s"));
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче