[llvm] 7d31d3b - Fix "not all control paths return a value" introduced by D142642

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 27 17:59:13 PST 2023


Author: Mircea Trofin
Date: 2023-01-27T17:59:05-08:00
New Revision: 7d31d3b09844897821db029f96682853160863d0

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

LOG: Fix "not all control paths return a value" introduced by D142642

Added: 
    

Modified: 
    llvm/lib/Analysis/TensorSpec.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Analysis/TensorSpec.cpp b/llvm/lib/Analysis/TensorSpec.cpp
index d4dc5570f8e4..8dd1a054af88 100644
--- a/llvm/lib/Analysis/TensorSpec.cpp
+++ b/llvm/lib/Analysis/TensorSpec.cpp
@@ -119,6 +119,8 @@ std::string tensorValueToString(const char *Buffer, const TensorSpec &Spec) {
   case TensorType::Invalid:
     llvm_unreachable("invalid tensor type");
   }
+  // To appease warnings about not all control paths returning a value.
+  return "";
 }
 
 } // namespace llvm


        


More information about the llvm-commits mailing list