summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorPhilip Pfaffe <philip.pfaffe@gmail.com>2019-02-02 23:19:32 +0000
committerPhilip Pfaffe <philip.pfaffe@gmail.com>2019-02-02 23:19:32 +0000
commite3f105c651c88002f33df117b8f2c8f8ed003993 (patch)
treef09aac53089d33a63854a8cef4e7a4a7917783bf /clang/lib/Frontend/CompilerInvocation.cpp
parentc16cc77917052ea01c6faad888d990727ed3ce3a (diff)
downloadbcm5719-llvm-e3f105c651c88002f33df117b8f2c8f8ed003993.tar.gz
bcm5719-llvm-e3f105c651c88002f33df117b8f2c8f8ed003993.zip
[NewPM] Add support for new-PM plugins to clang
Summary: This adds support for new-PM plugin loading to clang. The option `-fpass-plugin=` may be used to specify a dynamic shared object file that adheres to the PassPlugin API. Tested: created simple plugin that registers an EP callback; with optimization level > 0, the pass is run as expected. Committed on behalf of Marco Elver Differential Revision: https://reviews.llvm.org/D56935 llvm-svn: 352972
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 05cce3c9094..b991a89e41b 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -1322,6 +1322,8 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
Opts.DefaultFunctionAttrs = Args.getAllArgValues(OPT_default_function_attr);
+ Opts.PassPlugins = Args.getAllArgValues(OPT_fpass_plugin_EQ);
+
return Success;
}
OpenPOWER on IntegriCloud