]> granicus.if.org Git - clang/commit
Change MemoryBuffer* to MemoryBuffer& parameter to Lexer::ComputePreamble
authorDavid Blaikie <dblaikie@gmail.com>
Mon, 11 Aug 2014 22:08:06 +0000 (22:08 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Mon, 11 Aug 2014 22:08:06 +0000 (22:08 +0000)
commit9febd243459dca68f48e886ecc1611613582ce7d
treebcac757eb6b5b3b0bb5c65086ce82e8597c05f51
parent88b00c0761dc588d14d37517a71d96be9690119a
Change MemoryBuffer* to MemoryBuffer& parameter to Lexer::ComputePreamble

(dropping const from the reference as MemoryBuffer is immutable already,
so const is just redundant - and while I'd personally put const
everywhere, that's not the LLVM Way (see llvm::Type for another example
of an immutable type where "const" is omitted for brevity))

Changing the pointer argument to a reference parameter makes call sites
identical between callers with unique_ptrs or raw pointers, minimizing
the churn in a pending unique_ptr migrations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215391 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Lex/Lexer.h
lib/Frontend/ASTUnit.cpp
lib/Frontend/FrontendActions.cpp
lib/Lex/Lexer.cpp