[flang-commits] [flang] ff56b74 - [flang] Add two llvm_unreachable() calls to new code to silence compiler warning

Peter Klausler via flang-commits flang-commits at lists.llvm.org
Mon Jul 31 16:05:02 PDT 2023


Author: Peter Klausler
Date: 2023-07-31T16:04:51-07:00
New Revision: ff56b7474f287b28e155c4a481feb47b68b4f7cd

URL: https://github.com/llvm/llvm-project/commit/ff56b7474f287b28e155c4a481feb47b68b4f7cd
DIFF: https://github.com/llvm/llvm-project/commit/ff56b7474f287b28e155c4a481feb47b68b4f7cd.diff

LOG: [flang] Add two llvm_unreachable() calls to new code to silence compiler warning

This gets our -Werror build working again.

Differential Revision: https://reviews.llvm.org/D156745

Added: 
    

Modified: 
    flang/lib/Optimizer/Builder/PPCIntrinsicCall.cpp

Removed: 
    


################################################################################
diff  --git a/flang/lib/Optimizer/Builder/PPCIntrinsicCall.cpp b/flang/lib/Optimizer/Builder/PPCIntrinsicCall.cpp
index 48f632d04039ae..68c5f2d3356631 100644
--- a/flang/lib/Optimizer/Builder/PPCIntrinsicCall.cpp
+++ b/flang/lib/Optimizer/Builder/PPCIntrinsicCall.cpp
@@ -1272,6 +1272,7 @@ const char *getMmaIrIntrName(MMAOp mmaOp) {
   case MMAOp::DisassemblePair:
     return "llvm.ppc.vsx.disassemble.pair";
   }
+  llvm_unreachable("getMmaIrIntrName");
 }
 
 mlir::FunctionType getMmaIrFuncType(mlir::MLIRContext *context, MMAOp mmaOp) {
@@ -1285,6 +1286,7 @@ mlir::FunctionType getMmaIrFuncType(mlir::MLIRContext *context, MMAOp mmaOp) {
   case MMAOp::DisassemblePair:
     return genMmaDisassembleFuncType(context, mmaOp);
   }
+  llvm_unreachable("getMmaIrFuncType");
 }
 
 template <MMAOp IntrId, MMAHandlerOp HandlerOp>


        


More information about the flang-commits mailing list