[llvm] r313212 - Use MemoryBufferRef. (NFC)
Adrian Prantl via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 13 16:16:14 PDT 2017
Author: adrian
Date: Wed Sep 13 16:16:13 2017
New Revision: 313212
URL: http://llvm.org/viewvc/llvm-project?rev=313212&view=rev
Log:
Use MemoryBufferRef. (NFC)
Modified:
llvm/trunk/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
Modified: llvm/trunk/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-dwarfdump/llvm-dwarfdump.cpp?rev=313212&r1=313211&r2=313212&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-dwarfdump/llvm-dwarfdump.cpp (original)
+++ llvm/trunk/tools/llvm-dwarfdump/llvm-dwarfdump.cpp Wed Sep 13 16:16:13 2017
@@ -122,10 +122,9 @@ static bool verifyObjectFile(ObjectFile
return Result;
}
-static bool handleBuffer(StringRef Filename, MemoryBuffer &Buffer,
+static bool handleBuffer(StringRef Filename, MemoryBufferRef Buffer,
std::function<bool(ObjectFile &, Twine)> HandleObj) {
- Expected<std::unique_ptr<Binary>> BinOrErr =
- object::createBinary(Buffer.getMemBufferRef());
+ Expected<std::unique_ptr<Binary>> BinOrErr = object::createBinary(Buffer);
if (!BinOrErr)
error(Filename, errorToErrorCode(BinOrErr.takeError()));
More information about the llvm-commits
mailing list