[PATCH] D37788: [ARM] builtins: Replace abort by assert in clear_cache.

Manoj Gupta via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 27 03:18:16 PDT 2017


manojgupta updated this revision to Diff 116785.
manojgupta retitled this revision from "[ARM] builtins: Do not abort in clear_cache." to "[ARM] builtins: Replace abort by assert in clear_cache.".
manojgupta edited the summary of this revision.
manojgupta removed a reviewer: joerg.
manojgupta added a comment.

Replaced abort by an assert as requested.


https://reviews.llvm.org/D37788

Files:
  lib/builtins/clear_cache.c


Index: lib/builtins/clear_cache.c
===================================================================
--- lib/builtins/clear_cache.c
+++ lib/builtins/clear_cache.c
@@ -9,6 +9,7 @@
  */
 
 #include "int_lib.h"
+#include <assert.h>
 #include <stddef.h>
 
 #if __APPLE__
@@ -121,9 +122,7 @@
                           : "=r"(start_reg)
                           : "r"(syscall_nr), "r"(start_reg), "r"(end_reg),
                             "r"(flags));
-         if (start_reg != 0) {
-             compilerrt_abort();
-         }
+         assert(start_reg == 0 && "Cache flush syscall failed.");
     #elif defined(_WIN32)
         FlushInstructionCache(GetCurrentProcess(), start, end - start);
     #else


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37788.116785.patch
Type: text/x-patch
Size: 707 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170927/23551184/attachment.bin>


More information about the llvm-commits mailing list