summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2015-05-20 20:41:27 +0000
committerAlex Lorenz <arphaman@gmail.com>2015-05-20 20:41:27 +0000
commitc6277793dd0e8d045a5bfc64a18236217ac1680a (patch)
treee8acadd2164ecc03e3a1d463509c814f7f113e12 /llvm/lib/AsmParser
parent558850ac5954c156347754614b67abfe7d86b2e8 (diff)
downloadbcm5719-llvm-c6277793dd0e8d045a5bfc64a18236217ac1680a.tar.gz
bcm5719-llvm-c6277793dd0e8d045a5bfc64a18236217ac1680a.zip
AsmParser: Require a terminating null character when creating memory buffer.
This commit modifies the memory buffer creation in the AsmParser library so that it requires a terminating null character. The LLLexer in the AsmParser library checks for EOF only when it sees a null character, thus it would be best to require it when creating a memory buffer so that the memory buffer constructor can verify that a terminating null character is indeed present. Reviewers: Duncan P. N. Exon Smith, Matthias Braun Differential Revision: http://reviews.llvm.org/D9883 llvm-svn: 237833
Diffstat (limited to 'llvm/lib/AsmParser')
-rw-r--r--llvm/lib/AsmParser/Parser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/AsmParser/Parser.cpp b/llvm/lib/AsmParser/Parser.cpp
index 2e76c0ecc45..c55a6a1e243 100644
--- a/llvm/lib/AsmParser/Parser.cpp
+++ b/llvm/lib/AsmParser/Parser.cpp
@@ -24,7 +24,7 @@ using namespace llvm;
bool llvm::parseAssemblyInto(MemoryBufferRef F, Module &M, SMDiagnostic &Err) {
SourceMgr SM;
- std::unique_ptr<MemoryBuffer> Buf = MemoryBuffer::getMemBuffer(F, false);
+ std::unique_ptr<MemoryBuffer> Buf = MemoryBuffer::getMemBuffer(F);
SM.AddNewSourceBuffer(std::move(Buf), SMLoc());
return LLParser(F.getBuffer(), SM, Err, &M).Run();
OpenPOWER on IntegriCloud