diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp index 7cc4008ec1f2b..10221c0b83bdc 100644 --- a/clang/lib/Driver/ToolChains/CommonArgs.cpp +++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp @@ -2936,8 +2936,7 @@ void tools::addMCModel(const Driver &D, const llvm::opt::ArgList &Args, Ok = CM == "small" || CM == "medium" || (CM == "large" && Triple.isRISCV64()); } else if (Triple.getArch() == llvm::Triple::x86_64) { - Ok = llvm::is_contained({"small", "kernel", "medium", "large", "tiny"}, - CM); + Ok = llvm::is_contained({"small", "kernel", "medium", "large"}, CM); } else if (Triple.isNVPTX() || Triple.isAMDGPU() || Triple.isSPIRV()) { // NVPTX/AMDGPU/SPIRV does not care about the code model and will accept // whatever works for the host. diff --git a/clang/test/Driver/mcmodel.c b/clang/test/Driver/mcmodel.c index c6c8b5433d23b..51c2effb56ad4 100644 --- a/clang/test/Driver/mcmodel.c +++ b/clang/test/Driver/mcmodel.c @@ -1,5 +1,5 @@ // RUN: not %clang -### -c --target=i686 -mcmodel=medium %s 2>&1 | FileCheck --check-prefix=ERR-MEDIUM %s -// RUN: %clang --target=x86_64 -### -c -mcmodel=tiny %s 2>&1 | FileCheck --check-prefix=TINY %s +// RUN: not %clang --target=x86_64 -### -c -mcmodel=tiny %s 2>&1 | FileCheck --check-prefix=ERR-TINY %s // RUN: %clang --target=x86_64 -### -c -mcmodel=small %s 2>&1 | FileCheck --check-prefix=SMALL %s // RUN: %clang --target=x86_64 -### -S -mcmodel=kernel %s 2>&1 | FileCheck --check-prefix=KERNEL %s // RUN: %clang --target=x86_64 -### -c -mcmodel=medium %s 2>&1 | FileCheck --check-prefix=MEDIUM %s