[MinGW] Define __ARM_DWARF_EH__ for MinGW/ARM
authorMartin Storsjo <martin@martin.st>
Fri, 17 Nov 2017 08:06:49 +0000 (08:06 +0000)
committerMartin Storsjo <martin@martin.st>
Fri, 17 Nov 2017 08:06:49 +0000 (08:06 +0000)
Since SVN r318510, the MinGW/ARM configuration defaults to
dwarf exception handling.

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

llvm-svn: 318511

clang/lib/Basic/Targets/ARM.cpp
clang/test/Preprocessor/init.c

index def490b..e6dd6de 100644 (file)
@@ -1002,6 +1002,7 @@ void MinGWARMTargetInfo::getTargetDefines(const LangOptions &Opts,
   DefineStd(Builder, "WIN32", Opts);
   DefineStd(Builder, "WINNT", Opts);
   Builder.defineMacro("_ARM_");
+  Builder.defineMacro("__ARM_DWARF_EH__");
   addMinGWDefines(Opts, Builder);
 }
 
index 87a5919..f508c9e 100644 (file)
 // Thumbebv7: #define __THUMB_INTERWORK__ 1
 // Thumbebv7: #define __thumb2__ 1
 
+// RUN: %clang -E -dM -ffreestanding -target thumbv7-pc-mingw32 %s -o - | FileCheck -match-full-lines -check-prefix THUMB-MINGW %s
+
+// THUMB-MINGW:#define __ARM_DWARF_EH__ 1
+
 //
 // RUN: %clang_cc1 -E -dM -ffreestanding -triple=i386-none-none < /dev/null | FileCheck -match-full-lines -check-prefix I386 %s
 //