r340552 - Driver: Enable address-significance tables by default when targeting COFF.

Peter Collingbourne via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 23 10:43:29 PDT 2018


Author: pcc
Date: Thu Aug 23 10:43:29 2018
New Revision: 340552

URL: http://llvm.org/viewvc/llvm-project?rev=340552&view=rev
Log:
Driver: Enable address-significance tables by default when targeting COFF.

Differential Revision: https://reviews.llvm.org/D51049

Modified:
    cfe/trunk/lib/Driver/ToolChains/Clang.cpp
    cfe/trunk/test/Driver/addrsig.c

Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Clang.cpp?rev=340552&r1=340551&r2=340552&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/Clang.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/Clang.cpp Thu Aug 23 10:43:29 2018
@@ -4857,7 +4857,8 @@ void Clang::ConstructJob(Compilation &C,
   }
 
   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");
 

Modified: cfe/trunk/test/Driver/addrsig.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/addrsig.c?rev=340552&r1=340551&r2=340552&view=diff
==============================================================================
--- cfe/trunk/test/Driver/addrsig.c (original)
+++ cfe/trunk/test/Driver/addrsig.c Thu Aug 23 10:43:29 2018
@@ -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




More information about the cfe-commits mailing list