added new 4th parameter to calls to SaveIntToMemory(~). Fixed mismatch of operator << for APInt.