diff options
author | Adrian McCarthy <amccarth@google.com> | 2018-01-09 23:49:30 +0000 |
---|---|---|
committer | Adrian McCarthy <amccarth@google.com> | 2018-01-09 23:49:30 +0000 |
commit | 5855293e6fbb63b4f7a0fb800e8ab69696b9882f (patch) | |
tree | be460bf11df710f1d50182e00a1409287748e40b /lib/Frontend/CompilerInvocation.cpp | |
parent | 8eca3654c70f64edf2fa8b86b7931d98ad4f39aa (diff) | |
download | clang-5855293e6fbb63b4f7a0fb800e8ab69696b9882f.tar.gz |
Reland "Emit Function IDs table for Control Flow Guard"
Adds option /guard:cf to clang-cl and -cfguard to cc1 to emit function IDs
of functions that have their address taken into a section named .gfids$y for
compatibility with Microsoft's Control Flow Guard feature.
The original patch didn't have the lit.local.cfg file that restricts the new
test to x86, thus the new test was failing on the non-x86 bots.
Differential Revision: https://reviews.llvm.org/D40531
The reverts r322008, which was a revert of r322005.
This reverts commit a05b89f9aca70597dc79fe97bc49b50b51f525ba.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@322136 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | lib/Frontend/CompilerInvocation.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index cd4df03dc9..07b1668fc0 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -721,6 +721,8 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK, Opts.MainFileName = Args.getLastArgValue(OPT_main_file_name); Opts.VerifyModule = !Args.hasArg(OPT_disable_llvm_verifier); + Opts.ControlFlowGuard = Args.hasArg(OPT_cfguard); + Opts.DisableGCov = Args.hasArg(OPT_test_coverage); Opts.EmitGcovArcs = Args.hasArg(OPT_femit_coverage_data); Opts.EmitGcovNotes = Args.hasArg(OPT_femit_coverage_notes); |