Avoids unnecessary copies. All changes audited & pass tests with asan. No functional change intended. llvm-svn: 272190