[C++11] Modernize the IR library a bit.

No functionality change.