Skip to content

Commit

Permalink
[Driver] Default ToolChain::IsIntegratedAssemblerDefault to true
Browse files Browse the repository at this point in the history
Have ToolChain::IsIntegratedAssemblerDefault default to true.

Almost all of the ToolChains are using IAS nowadays. There are a few exceptions like
XCore, some NaCl archs, and NVPTX/XCore in Generic_GCC::IsIntegratedAssemblerDefault.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D154902
  • Loading branch information
brad0 committed Jul 11, 2023
1 parent 82bbebb commit 4a1f8fd
Show file tree
Hide file tree
Showing 14 changed files with 2 additions and 22 deletions.
2 changes: 1 addition & 1 deletion clang/include/clang/Driver/ToolChain.h
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ class ToolChain {

/// IsIntegratedAssemblerDefault - Does this tool chain enable -integrated-as
/// by default.
virtual bool IsIntegratedAssemblerDefault() const { return false; }
virtual bool IsIntegratedAssemblerDefault() const { return true; }

/// IsIntegratedBackendDefault - Does this tool chain enable
/// -fintegrated-objemitter by default.
Expand Down
1 change: 0 additions & 1 deletion clang/lib/Driver/ToolChains/AIX.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ class LLVM_LIBRARY_VISIBILITY AIX : public ToolChain {
}
bool isPICDefaultForced() const override { return true; }
bool HasNativeLLVMSupport() const override { return true; }
bool IsIntegratedAssemblerDefault() const override { return true; }

void
AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs,
Expand Down
1 change: 0 additions & 1 deletion clang/lib/Driver/ToolChains/CrossWindows.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ class LLVM_LIBRARY_VISIBILITY CrossWindowsToolChain : public Generic_GCC {
CrossWindowsToolChain(const Driver &D, const llvm::Triple &T,
const llvm::opt::ArgList &Args);

bool IsIntegratedAssemblerDefault() const override { return true; }
UnwindTableLevel
getDefaultUnwindTableLevel(const llvm::opt::ArgList &Args) const override;
bool isPICDefault() const override;
Expand Down
4 changes: 0 additions & 4 deletions clang/lib/Driver/ToolChains/Darwin.h
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,6 @@ class LLVM_LIBRARY_VISIBILITY MachO : public ToolChain {
// expected to use /usr/include/Block.h.
return true;
}
bool IsIntegratedAssemblerDefault() const override {
// Default integrated assembler to on for Apple's MachO targets.
return true;
}

bool IsMathErrnoDefault() const override { return false; }

Expand Down
1 change: 0 additions & 1 deletion clang/lib/Driver/ToolChains/Fuchsia.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ class LLVM_LIBRARY_VISIBILITY Fuchsia : public ToolChain {
const llvm::opt::ArgList &Args);

bool HasNativeLLVMSupport() const override { return true; }
bool IsIntegratedAssemblerDefault() const override { return true; }
bool IsMathErrnoDefault() const override { return false; }
bool useRelaxRelocations() const override { return true; };
RuntimeLibType GetDefaultRuntimeLibType() const override {
Expand Down
1 change: 0 additions & 1 deletion clang/lib/Driver/ToolChains/HIPSPV.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ class LLVM_LIBRARY_VISIBILITY HIPSPVToolChain final : public ToolChain {

void adjustDebugInfoKind(llvm::codegenoptions::DebugInfoKind &DebugInfoKind,
const llvm::opt::ArgList &Args) const override;
bool IsIntegratedAssemblerDefault() const override { return true; }
bool IsMathErrnoDefault() const override { return false; }
bool useIntegratedAs() const override { return true; }
bool isCrossCompiling() const override { return true; }
Expand Down
4 changes: 0 additions & 4 deletions clang/lib/Driver/ToolChains/MSVC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -463,10 +463,6 @@ Tool *MSVCToolChain::buildAssembler() const {
return nullptr;
}

bool MSVCToolChain::IsIntegratedAssemblerDefault() const {
return true;
}

ToolChain::UnwindTableLevel
MSVCToolChain::getDefaultUnwindTableLevel(const ArgList &Args) const {
// Don't emit unwind tables by default for MachO targets.
Expand Down
1 change: 0 additions & 1 deletion clang/lib/Driver/ToolChains/MSVC.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ class LLVM_LIBRARY_VISIBILITY MSVCToolChain : public ToolChain {
TranslateArgs(const llvm::opt::DerivedArgList &Args, StringRef BoundArch,
Action::OffloadKind DeviceOffloadKind) const override;

bool IsIntegratedAssemblerDefault() const override;
UnwindTableLevel
getDefaultUnwindTableLevel(const llvm::opt::ArgList &Args) const override;
bool isPICDefault() const override;
Expand Down
2 changes: 0 additions & 2 deletions clang/lib/Driver/ToolChains/MinGW.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -518,8 +518,6 @@ toolchains::MinGW::MinGW(const Driver &D, const llvm::Triple &Triple,
.equals_insensitive("lld");
}

bool toolchains::MinGW::IsIntegratedAssemblerDefault() const { return true; }

Tool *toolchains::MinGW::getTool(Action::ActionClass AC) const {
switch (AC) {
case Action::PreprocessJobClass:
Expand Down
1 change: 0 additions & 1 deletion clang/lib/Driver/ToolChains/MinGW.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ class LLVM_LIBRARY_VISIBILITY MinGW : public ToolChain {

bool HasNativeLLVMSupport() const override;

bool IsIntegratedAssemblerDefault() const override;
UnwindTableLevel
getDefaultUnwindTableLevel(const llvm::opt::ArgList &Args) const override;
bool isPICDefault() const override;
Expand Down
2 changes: 0 additions & 2 deletions clang/lib/Driver/ToolChains/WebAssembly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,6 @@ bool WebAssembly::isPIEDefault(const llvm::opt::ArgList &Args) const {

bool WebAssembly::isPICDefaultForced() const { return false; }

bool WebAssembly::IsIntegratedAssemblerDefault() const { return true; }

bool WebAssembly::hasBlocksRuntime() const { return false; }

// TODO: Support profiling.
Expand Down
1 change: 0 additions & 1 deletion clang/lib/Driver/ToolChains/WebAssembly.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ class LLVM_LIBRARY_VISIBILITY WebAssembly final : public ToolChain {
bool isPICDefault() const override;
bool isPIEDefault(const llvm::opt::ArgList &Args) const override;
bool isPICDefaultForced() const override;
bool IsIntegratedAssemblerDefault() const override;
bool hasBlocksRuntime() const override;
bool SupportsProfiling() const override;
bool HasNativeLLVMSupport() const override;
Expand Down
1 change: 1 addition & 0 deletions clang/lib/Driver/ToolChains/XCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class LLVM_LIBRARY_VISIBILITY XCoreToolChain : public ToolChain {
Tool *buildLinker() const override;

public:
bool IsIntegratedAssemblerDefault() const override { return false; }
bool isPICDefault() const override;
bool isPIEDefault(const llvm::opt::ArgList &Args) const override;
bool isPICDefaultForced() const override;
Expand Down
2 changes: 0 additions & 2 deletions clang/lib/Driver/ToolChains/ZOS.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ class LLVM_LIBRARY_VISIBILITY ZOS : public ToolChain {
}
bool isPICDefaultForced() const override { return false; }

bool IsIntegratedAssemblerDefault() const override { return true; }

void TryAddIncludeFromPath(llvm::SmallString<128> Path,
const llvm::opt::ArgList &DriverArgs,
llvm::opt::ArgStringList &CC1Args) const;
Expand Down

0 comments on commit 4a1f8fd

Please sign in to comment.