[clang] 1f2122c - [clang][SVE] Use __inline__ instead of inline in arm_sve.h

Joe Ellis via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 18 09:10:34 PST 2021


Author: Joe Ellis
Date: 2021-02-18T17:09:46Z
New Revision: 1f2122c9b046a7d6d141f7c42528d8a3e2e66b70

URL: https://github.com/llvm/llvm-project/commit/1f2122c9b046a7d6d141f7c42528d8a3e2e66b70
DIFF: https://github.com/llvm/llvm-project/commit/1f2122c9b046a7d6d141f7c42528d8a3e2e66b70.diff

LOG: [clang][SVE] Use __inline__ instead of inline in arm_sve.h

The inline keyword is not defined in the C89 standard, so source files
that include arm_sve.h will fail compilation if -std=c89 is specified.
For consistency with arm_neon.h, we should use __inline__ instead.

Reviewed By: paulwalker-arm

Differential Revision: https://reviews.llvm.org/D96852

Added: 
    

Modified: 
    clang/utils/TableGen/SveEmitter.cpp

Removed: 
    


################################################################################
diff  --git a/clang/utils/TableGen/SveEmitter.cpp b/clang/utils/TableGen/SveEmitter.cpp
index 0e69600ef861..fe369e9d9408 100644
--- a/clang/utils/TableGen/SveEmitter.cpp
+++ b/clang/utils/TableGen/SveEmitter.cpp
@@ -1201,7 +1201,7 @@ void SVEEmitter::createHeader(raw_ostream &OS) {
   OS << "};\n\n";
 
   OS << "/* Function attributes */\n";
-  OS << "#define __aio static inline __attribute__((__always_inline__, "
+  OS << "#define __aio static __inline__ __attribute__((__always_inline__, "
         "__nodebug__, __overloadable__))\n\n";
 
   // Add reinterpret functions.


        


More information about the cfe-commits mailing list