[clang] 75c4339 - [clang][Interp][NFC] Implement dumping Invalid/Valid results
Timm Bäder via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 2 00:26:10 PST 2024
Author: Timm Bäder
Date: 2024-02-02T09:25:54+01:00
New Revision: 75c4339ef31922bf8c883a7a5dfe638ec6818ab2
URL: https://github.com/llvm/llvm-project/commit/75c4339ef31922bf8c883a7a5dfe638ec6818ab2
DIFF: https://github.com/llvm/llvm-project/commit/75c4339ef31922bf8c883a7a5dfe638ec6818ab2.diff
LOG: [clang][Interp][NFC] Implement dumping Invalid/Valid results
This was just an omission from an earlier commit, clearly
we can print them.
Added:
Modified:
clang/lib/AST/Interp/EvaluationResult.cpp
Removed:
################################################################################
diff --git a/clang/lib/AST/Interp/EvaluationResult.cpp b/clang/lib/AST/Interp/EvaluationResult.cpp
index a14dc87f1dfde..05105862a53a8 100644
--- a/clang/lib/AST/Interp/EvaluationResult.cpp
+++ b/clang/lib/AST/Interp/EvaluationResult.cpp
@@ -186,9 +186,12 @@ void EvaluationResult::dump() const {
OS << "\n";
break;
}
-
- default:
- llvm_unreachable("Can't print that.");
+ case Invalid:
+ OS << "Invalid\n";
+ break;
+ case Valid:
+ OS << "Valid\n";
+ break;
}
}
More information about the cfe-commits
mailing list