This patch ports the PlaceSafepoints pass to the new pass manager as it is used by .NET/Mono. Compatibility with the legacy pass manager is maintained by adding PlaceSafepointsLegacyPass. This pass also depends on PlaceBackedgeSafepointsLegacyPass, which has been kept in the legacy-only variant, since it is apparently used only from PlaceSafepointsPass. It has been renamed, though, to indicate its legacy interface.
looks fine, mostly just some nits
is this necessary?
nit: should have newline at end of file
not sure what this is for, but it's not used elsewhere in LLVM so it probably shouldn't be added here
This is most likely something specific to Visual Studio editor. There is short comment about that in clang/lib/Lex/Pragma.cpp
/// Handle "\#pragma region [...]" /// /// The syntax is /// \code /// #pragma region [optional name] /// #pragma endregion [optional comment] /// \endcode /// /// \note This is /// <a href="http://msdn.microsoft.com/en-us/library/b6xkz944(v=vs.80).aspx">editor-only</a> /// pragma, just skipped by compiler. struct PragmaRegionHandler : public PragmaHandler
So it seems it's safe to drop those.
do you need somebody to land this for you?
this should be updated to not use the legacy pm in a followup change