Driver: force restricted IT blocks for Windows on ARM

Windows on ARM expects ARMv8 (restricted IT) conditional instructions only.
Force enable the restricted IT mode via the backend option when targeting WoA.

llvm-svn: 209086
This commit is contained in:
Saleem Abdulrasool 2014-05-18 06:42:02 +00:00
parent a521845381
commit 6deb816c1c
2 changed files with 9 additions and 0 deletions

View File

@ -3451,6 +3451,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back("-backend-option");
CmdArgs.push_back("-arm-no-restrict-it");
}
} else if (TT.isOSWindows() && (TT.getArch() == llvm::Triple::arm ||
TT.getArch() == llvm::Triple::thumb)) {
// Windows on ARM expects restricted IT blocks
CmdArgs.push_back("-backend-option");
CmdArgs.push_back("-arm-restrict-it");
}
// Forward -f options with positive and negative forms; we translate

View File

@ -0,0 +1,4 @@
// RUN: %clang -target armv7-windows -### %s 2>&1 | FileCheck %s
// CHECK: "-backend-option" "-arm-restrict-it"