Basic: fix handling for Windows Itanium environment

This corrects the handling for i686-windows-itanium.  This environment is nearly
identical to Windows MSVC, except it uses the itanium ABI for C++.

llvm-svn: 211991
This commit is contained in:
Saleem Abdulrasool 2014-06-28 23:34:11 +00:00
parent d1ee08e7cd
commit 24bd7da2d2
2 changed files with 16 additions and 0 deletions

View File

@ -6301,6 +6301,7 @@ static TargetInfo *AllocateTarget(const llvm::Triple &Triple) {
return new CygwinX86_32TargetInfo(Triple);
case llvm::Triple::GNU:
return new MinGWX86_32TargetInfo(Triple);
case llvm::Triple::Itanium:
case llvm::Triple::MSVC:
return new MicrosoftX86_32TargetInfo(Triple);
}

View File

@ -0,0 +1,15 @@
// RUN: %clang_cc1 -triple i686-windows-itanium -emit-llvm %s -o - \
// RUN: | FileCheck %s -check-prefix CHECK-C -check-prefix CHECK
// RUN: %clang_cc1 -triple i686-windows-itanium -emit-llvm -x c++ %s -o - \
// RUN: | FileCheck %s -check-prefix CHECK-CXX -check-prefix CHECK
int function() {
return 32;
}
// CHECK-C: define i32 @function() {{.*}} {
// CHECK-CXX: define i32 @_Z8functionv() {{.*}} {
// CHECK: ret i32 32
// CHECK: }