The assertion in InstrumentBasicBlocks.cpp:220 that checks for the presence of an authoritative predecessor fails for basic blocks other than the entry block that do not have predecessors.
I'm not sure what causes these blocks to be generated in the first place, but I stumbled upon this when instrumenting libgit2. Workaround is to run opt with -simplifycfg before instrumentation, which could probably be requested in InstrumentBasicBlocks::getAnalysisUsage().
The assertion in InstrumentBasicBlocks.cpp:220 that checks for the presence of an authoritative predecessor fails for basic blocks other than the entry block that do not have predecessors.
I'm not sure what causes these blocks to be generated in the first place, but I stumbled upon this when instrumenting libgit2. Workaround is to run opt with
-simplifycfgbefore instrumentation, which could probably be requested inInstrumentBasicBlocks::getAnalysisUsage().