Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clang/lib/AST/RecordLayoutBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1953,7 +1953,7 @@ void ItaniumRecordLayoutBuilder::LayoutField(const FieldDecl *D,
// silently there. For other targets that have ms_struct enabled
// (most probably via a pragma or attribute), trigger a diagnostic
// that defaults to an error.
if (!Context.getTargetInfo().getTriple().isWindowsGNUEnvironment())
if (!Context.getTargetInfo().getTriple().isOSCygMing())
Diag(D->getLocation(), diag::warn_npot_ms_struct);
}
if (TypeSize > FieldAlign &&
Expand Down
8 changes: 4 additions & 4 deletions clang/lib/CIR/CodeGen/CIRGenModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1530,10 +1530,10 @@ static bool shouldAssumeDSOLocal(const CIRGenModule &cgm,

const llvm::Triple &tt = cgm.getTriple();
const CodeGenOptions &cgOpts = cgm.getCodeGenOpts();
if (tt.isWindowsGNUEnvironment()) {
// In MinGW, variables without DLLImport can still be automatically
// imported from a DLL by the linker; don't mark variables that
// potentially could come from another DLL as DSO local.
if (tt.isOSCygMing()) {
// In MinGW and Cygwin, variables without DLLImport can still be
// automatically imported from a DLL by the linker; don't mark variables
// that potentially could come from another DLL as DSO local.

// With EmulatedTLS, TLS variables can be autoimported from other DLLs
// (and this actually happens in the public interface of libstdc++), so
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ std::string ToolChain::buildCompilerRTBasename(const llvm::opt::ArgList &Args,
break;
case ToolChain::FT_Shared:
if (TT.isOSWindows())
Suffix = TT.isWindowsGNUEnvironment() ? ".dll.a" : ".lib";
Suffix = TT.isOSCygMing() ? ".dll.a" : ".lib";
else if (TT.isOSAIX())
Suffix = ".a";
else
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/Clang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5965,7 +5965,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back("-mms-bitfields");
}

if (Triple.isWindowsGNUEnvironment()) {
if (Triple.isOSCygMing()) {
Args.addOptOutFlag(CmdArgs, options::OPT_fauto_import,
options::OPT_fno_auto_import);
}
Expand Down
4 changes: 2 additions & 2 deletions clang/lib/Frontend/InitPreprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -945,8 +945,8 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
if (LangOpts.GNUCVersion && LangOpts.CPlusPlus11)
Builder.defineMacro("__GXX_EXPERIMENTAL_CXX0X__");

if (TI.getTriple().isWindowsGNUEnvironment()) {
// Set ABI defining macros for libstdc++ for MinGW, where the
if (TI.getTriple().isOSCygMing()) {
// Set ABI defining macros for libstdc++ for MinGW and Cygwin, where the
// default in libstdc++ differs from the defaults for this target.
Builder.defineMacro("__GXX_TYPEINFO_EQUALITY_INLINE", "0");
}
Expand Down
4 changes: 2 additions & 2 deletions clang/lib/Sema/SemaDecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12578,9 +12578,9 @@ static bool isDefaultStdCall(FunctionDecl *FD, Sema &S) {
if (FD->getName() == "main" || FD->getName() == "wmain")
return false;

// Default calling convention for MinGW is __cdecl
// Default calling convention for MinGW and Cygwin is __cdecl
const llvm::Triple &T = S.Context.getTargetInfo().getTriple();
if (T.isWindowsGNUEnvironment())
if (T.isOSCygMing())
return false;

// Default calling convention for WinMain, wWinMain and DllMain
Expand Down
Loading