From 85e4484647dc945fb3cc4830e41fd112b045a60a Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Thu, 23 Aug 2018 17:43:29 +0000 Subject: [PATCH] Driver: Enable address-significance tables by default when targeting COFF. Differential Revision: https://reviews.llvm.org/D51049 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@340552 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Driver/ToolChains/Clang.cpp | 3 ++- test/Driver/addrsig.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Driver/ToolChains/Clang.cpp b/lib/Driver/ToolChains/Clang.cpp index 45c63d5430..8d73db1ca2 100644 --- a/lib/Driver/ToolChains/Clang.cpp +++ b/lib/Driver/ToolChains/Clang.cpp @@ -4857,7 +4857,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, } if (Args.hasFlag(options::OPT_faddrsig, options::OPT_fno_addrsig, - getToolChain().getTriple().isOSBinFormatELF() && + (getToolChain().getTriple().isOSBinFormatELF() || + getToolChain().getTriple().isOSBinFormatCOFF()) && getToolChain().useIntegratedAs())) CmdArgs.push_back("-faddrsig"); diff --git a/test/Driver/addrsig.c b/test/Driver/addrsig.c index fd5598c472..4eea415c01 100644 --- a/test/Driver/addrsig.c +++ b/test/Driver/addrsig.c @@ -1,4 +1,5 @@ // RUN: %clang -### -target x86_64-unknown-linux -c %s 2>&1 | FileCheck -check-prefix=ADDRSIG %s +// RUN: %clang -### -target x86_64-pc-win32 -c %s 2>&1 | FileCheck -check-prefix=ADDRSIG %s // RUN: %clang -### -target x86_64-unknown-linux -fno-integrated-as -c %s 2>&1 | FileCheck -check-prefix=NO-ADDRSIG %s // RUN: %clang -### -target x86_64-unknown-linux -fno-integrated-as -faddrsig -c %s 2>&1 | FileCheck -check-prefix=ADDRSIG %s // RUN: %clang -### -target x86_64-unknown-linux -fno-addrsig -c %s 2>&1 | FileCheck -check-prefix=NO-ADDRSIG %s -- 2.40.0