As of D18614, TargetMachine exposes a hook to add a set of passes that should
be run as early as possible. Invoke this hook from clang when setting up the
pass manager.
Details
Diff Detail
Event Timeline
Minor tweak, but with that LGTM once the LLVM side is in place.
lib/CodeGen/BackendUtil.cpp | ||
---|---|---|
347 | Why capture this? Capturing TM would seem narrower. If you don't want a narrow capture, I'd just use [&]... |
lib/CodeGen/BackendUtil.cpp | ||
---|---|---|
347 | TM is a member variable; you can't explicitly capture member variables? https://godbolt.org/g/T4kl3G I can change it to [&] if you like that better. |
lib/CodeGen/BackendUtil.cpp | ||
---|---|---|
347 | Wow, C++ is silly here. You can't capture it *by value*. You have to use an init capture (which we can't use yet). How silly. Anyways, thanks for the explanation. |
Why capture this? Capturing TM would seem narrower. If you don't want a narrow capture, I'd just use [&]...