[Openmp-commits] [PATCH] D117555: Revert "[ELF] Simplify elf::link exit. NFC"

Florian Hahn via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Jan 18 04:10:28 PST 2022


fhahn updated this revision to Diff 400809.
fhahn added a comment.
Herald added a project: OpenMP.
Herald added a subscriber: openmp-commits.

Try to run all tests


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117555/new/

https://reviews.llvm.org/D117555

Files:
  lld/ELF/Driver.cpp
  openmp/libomptarget/test/offloading/bug50022.cpp


Index: openmp/libomptarget/test/offloading/bug50022.cpp
===================================================================
--- openmp/libomptarget/test/offloading/bug50022.cpp
+++ openmp/libomptarget/test/offloading/bug50022.cpp
@@ -33,7 +33,7 @@
 
 #pragma omp taskwait
 
-  assert(a == 3 && "wrong result!");
+  assert(a == 3 && "wrong result2!");
 
   return 0;
 }
Index: lld/ELF/Driver.cpp
===================================================================
--- lld/ELF/Driver.cpp
+++ lld/ELF/Driver.cpp
@@ -129,12 +129,13 @@
   // Exit immediately if we don't need to return to the caller.
   // This saves time because the overhead of calling destructors
   // for all globally-allocated objects is not negligible.
-  int hasError = errorCount() ? 1 : 0;
   if (canExitEarly)
-    exitLld(hasError);
-  else
+    exitLld(errorCount() ? 1 : 0);
+
+  bool ret = errorCount() == 0;
+  if (!canExitEarly)
     errorHandler().reset();
-  return !hasError;
+  return ret;
 }
 
 // Parses a linker -m option.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117555.400809.patch
Type: text/x-patch
Size: 1009 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20220118/4c4f0bf6/attachment.bin>


More information about the Openmp-commits mailing list