diff options
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
| -rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index 6b09f7f..8034ce9 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -1058,7 +1058,9 @@ void CompilerInstance::printDiagnosticStats() { if (!getLangOpts().CUDAIsDevice) { OS << " when compiling for host"; } else { - OS << " when compiling for " << getTargetOpts().CPU; + OS << " when compiling for " + << (!getTargetOpts().CPU.empty() ? getTargetOpts().CPU + : getTarget().getTriple().str()); } } OS << ".\n"; |
