patch tweaks for llvm 3.2