It isn't clear from the documentation, but the basic block class has support for a pred iterator, which gives the predecessors to the basic block. In C++11 style, one could loop through the predecessors of a block as follows:
BasicBlock* B = ...
for (auto it = pred_begin(B), et = pred_end(B); it != et; ++it)
{
BasicBlock* predecessor = *it;
...
}