diff --git a/clang/utils/TableGen/NeonEmitter.cpp b/clang/utils/TableGen/NeonEmitter.cpp --- a/clang/utils/TableGen/NeonEmitter.cpp +++ b/clang/utils/TableGen/NeonEmitter.cpp @@ -2311,9 +2311,14 @@ OS << "#ifndef __ARM_NEON_H\n"; OS << "#define __ARM_NEON_H\n\n"; + OS << "#ifndef __ARM_FP\n"; + OS << "#error \"NEON intrinsics not available with the soft-float ABI. " + "Please use -mfloat-abi=softfp or -mfloat-abi=hard\"\n"; + OS << "#else\n\n"; + OS << "#if !defined(__ARM_NEON)\n"; OS << "#error \"NEON support not enabled\"\n"; - OS << "#endif\n\n"; + OS << "#else\n\n"; OS << "#include \n\n"; @@ -2403,6 +2408,8 @@ OS << "\n"; OS << "#undef __ai\n\n"; + OS << "#endif /* if !defined(__ARM_NEON) */\n"; + OS << "#endif /* ifndef __ARM_FP */\n"; OS << "#endif /* __ARM_NEON_H */\n"; }