[PATCH] D56935: [NewPM] Add support for new-PM plugins to clang

Marco Elver via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 22 13:45:04 PST 2019


melver added a comment.

Thanks!

In D56935#1366756 <https://reviews.llvm.org/D56935#1366756>, @philip.pfaffe wrote:

> This generally looks sane. What will happen on windows though? Will it silently fail?


AFAIK PassPlugin::Load uses sys::DynamicLibrary::getPermanentLibrary, which uses DynamicLibrary::HandleSet::AddLibrary which works for Windows as well. (The story is similar to legacy -fplugin=).



================
Comment at: clang/include/clang/Basic/CodeGenOptions.h:292
+  /// List of dynamic shared object files to be loaded as pass plugins.
+  std::vector<std::string> PassPlugins;
+
----------------
philip.pfaffe wrote:
> This  should be SmallVector.
Not sure if this is better. getAllArgValues returns a vector<string>, which is why I think the above members are also vector<string>. And std::vector cannot be assigned to SmallVector, which required an extra line in CompilerInvocation.cpp.

Let me know what you think.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56935/new/

https://reviews.llvm.org/D56935





More information about the cfe-commits mailing list