diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-08-11 22:08:06 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-08-11 22:08:06 +0000 |
commit | 3d95d858f9a46d792d83f31466880f07cefc1ba8 (patch) | |
tree | b7775b2062472042af1075b59045ba02aa3b3b28 /clang/lib/Frontend/FrontendActions.cpp | |
parent | c64c1751738ecd3c3fb388aaaaced56b010a6607 (diff) | |
download | bcm5719-llvm-3d95d858f9a46d792d83f31466880f07cefc1ba8.tar.gz bcm5719-llvm-3d95d858f9a46d792d83f31466880f07cefc1ba8.zip |
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.
llvm-svn: 215391
Diffstat (limited to 'clang/lib/Frontend/FrontendActions.cpp')
-rw-r--r-- | clang/lib/Frontend/FrontendActions.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Frontend/FrontendActions.cpp b/clang/lib/Frontend/FrontendActions.cpp index 903abe2d61f..e5830d6ae68 100644 --- a/clang/lib/Frontend/FrontendActions.cpp +++ b/clang/lib/Frontend/FrontendActions.cpp @@ -685,7 +685,7 @@ void PrintPreambleAction::ExecuteAction() { llvm::MemoryBuffer *Buffer = CI.getFileManager().getBufferForFile(getCurrentFile()); if (Buffer) { - unsigned Preamble = Lexer::ComputePreamble(Buffer, CI.getLangOpts()).first; + unsigned Preamble = Lexer::ComputePreamble(*Buffer, CI.getLangOpts()).first; llvm::outs().write(Buffer->getBufferStart(), Preamble); delete Buffer; } |