I tried to pass a const LLVMContext & to llvm::Type::getInt32Ty and
was surprised that it didn't work. Upon closer inspection, llvm::Type
defines many static functions that just access a member of LLVMContext
and LLVMContextImpl, and so -- as far as I can tell -- may as well
take a const reference, not a mutable reference.
I didn't want to change too much at once, so this patch just adds const
to one-line static functions defined on llvm::Type. For example, I left
llvm::Type::getIntNTy alone since that calls llvm::IntegerType::get,
which in turn calls the llvm::Type constructor, which sets the
LLVMContext &Context member of llvm::Type -- changing ALL of those
to use const LLVMContext & seemed like something I could do in a later
patch (if it would work at all, as of now I don't know that it would).