Skip to content

Commit 1b5875b

Browse files
mati865jeremyd2019
authored andcommitted
[Clang][Cygwin] Enable few conditions that are shared with MinGW
1 parent b183a27 commit 1b5875b

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

clang/lib/AST/RecordLayoutBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1946,7 +1946,7 @@ void ItaniumRecordLayoutBuilder::LayoutField(const FieldDecl *D,
19461946
// silently there. For other targets that have ms_struct enabled
19471947
// (most probably via a pragma or attribute), trigger a diagnostic
19481948
// that defaults to an error.
1949-
if (!Context.getTargetInfo().getTriple().isWindowsGNUEnvironment())
1949+
if (!Context.getTargetInfo().getTriple().isOSCygMing())
19501950
Diag(D->getLocation(), diag::warn_npot_ms_struct);
19511951
}
19521952
if (TypeSize > FieldAlign &&

clang/lib/CodeGen/Targets/X86.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1374,7 +1374,7 @@ class WinX86_64ABIInfo : public ABIInfo {
13741374
public:
13751375
WinX86_64ABIInfo(CodeGen::CodeGenTypes &CGT, X86AVXABILevel AVXLevel)
13761376
: ABIInfo(CGT), AVXLevel(AVXLevel),
1377-
IsMingw64(getTarget().getTriple().isWindowsGNUEnvironment()) {}
1377+
IsMingw64(getTarget().getTriple().isOSCygMing()) {}
13781378

13791379
void computeInfo(CGFunctionInfo &FI) const override;
13801380

clang/lib/Driver/ToolChain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ std::string ToolChain::buildCompilerRTBasename(const llvm::opt::ArgList &Args,
749749
break;
750750
case ToolChain::FT_Shared:
751751
Suffix = TT.isOSWindows()
752-
? (TT.isWindowsGNUEnvironment() ? ".dll.a" : ".lib")
752+
? (TT.isOSCygMing() ? ".dll.a" : ".lib")
753753
: ".so";
754754
break;
755755
}

clang/lib/Sema/SemaDecl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12516,7 +12516,7 @@ static bool isDefaultStdCall(FunctionDecl *FD, Sema &S) {
1251612516

1251712517
// Default calling convention for MinGW is __cdecl
1251812518
const llvm::Triple &T = S.Context.getTargetInfo().getTriple();
12519-
if (T.isWindowsGNUEnvironment())
12519+
if (T.isOSCygMing())
1252012520
return false;
1252112521

1252212522
// Default calling convention for WinMain, wWinMain and DllMain

0 commit comments

Comments
 (0)