[llvm-dev] how to add createLowerSwitchPass to PassManager object?

Taher via llvm-dev llvm-dev at lists.llvm.org
Fri Nov 12 10:54:01 PST 2021


My pass crashes on the callsite of runOnFunction() as it calls GetAnalysis
to LazyValue internally.

FunctionPass* lower = createLowerSwitchPass();
lower->runOnFunction(F);

The crash log says: *Assertion failed: (Resolver && "Pass has not been
inserted into a PassManager object!")*

How do I get the PassManager object to add LowerSwitchPass? I can't happen
to find the object anywhere. Can the legacy pass manager run lower passes
in llvm14? Alternatively, is there another method I can use to create
LowerSwitchPass with the new PassManager?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20211112/744e5b50/attachment-0001.html>


More information about the llvm-dev mailing list