[llvm] 73104d4 - [Clang][OpenMP][OMPIRBuilder] Change llvm_unreachable inside of getTargetEntryUniqueInfo to a more apt assert

Andrew Gozillon via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 7 16:10:05 PDT 2023


Author: Andrew Gozillon
Date: 2023-06-07T17:52:49-05:00
New Revision: 73104d4fbd5642c77536488fbda0c49abfcef009

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

LOG: [Clang][OpenMP][OMPIRBuilder] Change llvm_unreachable inside of getTargetEntryUniqueInfo to a more apt assert

However, with the correct condition this time and appropriate Clang
callback function to give the correct fallback Filename and Line Info.

Added: 
    

Modified: 
    llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
index 2e43e6bb250f6..a84b668e0e452 100644
--- a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+++ b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
@@ -5200,8 +5200,8 @@ OpenMPIRBuilder::getTargetEntryUniqueInfo(FileIdentifierInfoCallbackTy CallBack,
   sys::fs::UniqueID ID;
   auto FileIDInfo = CallBack();
   if (auto EC = sys::fs::getUniqueID(std::get<0>(FileIDInfo), ID)) {
-    llvm_unreachable(
-        "Unable to get unique ID for file, during getTargetEntryUniqueInfo");
+    assert(!EC &&
+           "Unable to get unique ID for file during getTargetEntryUniqueInfo");
   }
 
   return TargetRegionEntryInfo(ParentName, ID.getDevice(), ID.getFile(),


        


More information about the llvm-commits mailing list