summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/include/clang/AST/VTableBuilder.h1
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp4
2 files changed, 3 insertions, 2 deletions
diff --git a/clang/include/clang/AST/VTableBuilder.h b/clang/include/clang/AST/VTableBuilder.h
index 6db69ae9250..b0b71e47351 100644
--- a/clang/include/clang/AST/VTableBuilder.h
+++ b/clang/include/clang/AST/VTableBuilder.h
@@ -173,6 +173,7 @@ public:
case CK_UnusedFunctionPointer:
llvm_unreachable("Only function pointers kinds");
}
+ llvm_unreachable("Should already return");
}
private:
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index b7a3777fe45..c61a5f6ffa7 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -1393,8 +1393,8 @@ void CodeGenModule::EmitVTablesOpportunistically() {
// is not allowed to create new references to things that need to be emitted
// lazily. Note that it also uses fact that we eagerly emitting RTTI.
- assert(OpportunisticVTables.empty() || shouldOpportunisticallyEmitVTables() &&
- "Only emit opportunistic vtables with optimizations");
+ assert((OpportunisticVTables.empty() || shouldOpportunisticallyEmitVTables())
+ && "Only emit opportunistic vtables with optimizations");
for (const CXXRecordDecl *RD : OpportunisticVTables) {
assert(getVTables().isVTableExternal(RD) &&
OpenPOWER on IntegriCloud