[PATCH] D93279: [test-suite] Support GCC compilation of Microbenchmark MemFunctions.

Nichols A. Romero via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 15 21:41:06 PST 2020


naromero77 updated this revision to Diff 312106.
naromero77 added a comment.

- Place attribute before the definition and avoid ifdef.


Repository:
  rT test-suite

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

https://reviews.llvm.org/D93279

Files:
  MicroBenchmarks/MemFunctions/main.cpp


Index: MicroBenchmarks/MemFunctions/main.cpp
===================================================================
--- MicroBenchmarks/MemFunctions/main.cpp
+++ MicroBenchmarks/MemFunctions/main.cpp
@@ -26,8 +26,8 @@
 
 // This function prevents the compiler from interfering with `memcmp` and
 // makes sure the function is called.
-int RealMemCmp(const char *p, const char *q, size_t s)
-    __attribute__((no_builtin("memcmp"))) {
+__attribute__((no_builtin("memcmp")))
+int RealMemCmp(const char *p, const char *q, size_t s) {
   return memcmp(p, q, s);
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93279.312106.patch
Type: text/x-patch
Size: 561 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201216/4730c3b8/attachment.bin>


More information about the llvm-commits mailing list