summaryrefslogtreecommitdiffstats
path: root/clang/unittests/AST
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-08-27 20:03:29 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-08-27 20:03:29 +0000
commitd87f8d76e0633141712c32bc5266903e0a7715cd (patch)
treee3aa41e1c2a1d760765c68a65171fe51ef02e046 /clang/unittests/AST
parent7fa030330c5f36d2515792643214e3ac6f352392 (diff)
downloadbcm5719-llvm-d87f8d76e0633141712c32bc5266903e0a7715cd.tar.gz
bcm5719-llvm-d87f8d76e0633141712c32bc5266903e0a7715cd.zip
Update for LLVM api change.
llvm-svn: 216585
Diffstat (limited to 'clang/unittests/AST')
-rw-r--r--clang/unittests/AST/CommentLexer.cpp4
-rw-r--r--clang/unittests/AST/CommentParser.cpp4
-rw-r--r--clang/unittests/AST/ExternalASTSourceTest.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/clang/unittests/AST/CommentLexer.cpp b/clang/unittests/AST/CommentLexer.cpp
index cb8de271803..7cac1eaaf1c 100644
--- a/clang/unittests/AST/CommentLexer.cpp
+++ b/clang/unittests/AST/CommentLexer.cpp
@@ -60,8 +60,8 @@ protected:
void CommentLexerTest::lexString(const char *Source,
std::vector<Token> &Toks) {
- MemoryBuffer *Buf = MemoryBuffer::getMemBuffer(Source);
- FileID File = SourceMgr.createFileID(Buf);
+ std::unique_ptr<MemoryBuffer> Buf = MemoryBuffer::getMemBuffer(Source);
+ FileID File = SourceMgr.createFileID(Buf.release());
SourceLocation Begin = SourceMgr.getLocForStartOfFile(File);
Lexer L(Allocator, Diags, Traits, Begin, Source, Source + strlen(Source));
diff --git a/clang/unittests/AST/CommentParser.cpp b/clang/unittests/AST/CommentParser.cpp
index ae1410f377f..8c3895bda67 100644
--- a/clang/unittests/AST/CommentParser.cpp
+++ b/clang/unittests/AST/CommentParser.cpp
@@ -54,8 +54,8 @@ protected:
};
FullComment *CommentParserTest::parseString(const char *Source) {
- MemoryBuffer *Buf = MemoryBuffer::getMemBuffer(Source);
- FileID File = SourceMgr.createFileID(Buf);
+ std::unique_ptr<MemoryBuffer> Buf = MemoryBuffer::getMemBuffer(Source);
+ FileID File = SourceMgr.createFileID(Buf.release());
SourceLocation Begin = SourceMgr.getLocForStartOfFile(File);
Lexer L(Allocator, Diags, Traits, Begin, Source, Source + strlen(Source));
diff --git a/clang/unittests/AST/ExternalASTSourceTest.cpp b/clang/unittests/AST/ExternalASTSourceTest.cpp
index 6a5db6c1dd3..0cfde74cccc 100644
--- a/clang/unittests/AST/ExternalASTSourceTest.cpp
+++ b/clang/unittests/AST/ExternalASTSourceTest.cpp
@@ -50,7 +50,7 @@ bool testExternalASTSource(ExternalASTSource *Source,
CompilerInvocation *Invocation = new CompilerInvocation;
Invocation->getPreprocessorOpts().addRemappedFile(
- "test.cc", MemoryBuffer::getMemBuffer(FileContents));
+ "test.cc", MemoryBuffer::getMemBuffer(FileContents).release());
const char *Args[] = { "test.cc" };
CompilerInvocation::CreateFromArgs(*Invocation, Args,
Args + array_lengthof(Args),
OpenPOWER on IntegriCloud