summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-08-29 07:59:55 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-08-29 07:59:55 +0000
commit50a5f97e829c9878f1d611650f57b88d99c6ab96 (patch)
tree92fd083f5bbb0873bdaa9dc8869e94a5cf942782 /clang/lib/Frontend/CompilerInstance.cpp
parent0392cf892fcbad8224380c36c3e91dcaff18ece9 (diff)
downloadbcm5719-llvm-50a5f97e829c9878f1d611650f57b88d99c6ab96.tar.gz
bcm5719-llvm-50a5f97e829c9878f1d611650f57b88d99c6ab96.zip
unique_ptrify SourceManager::createFileID
llvm-svn: 216715
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index 4cba26cc632..513a43c1407 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -700,7 +700,8 @@ bool CompilerInstance::InitializeSourceManager(const FrontendInputFile &Input,
Kind = Input.isSystem() ? SrcMgr::C_System : SrcMgr::C_User;
if (Input.isBuffer()) {
- SourceMgr.setMainFileID(SourceMgr.createFileID(Input.getBuffer(), Kind));
+ SourceMgr.setMainFileID(SourceMgr.createFileID(
+ std::unique_ptr<llvm::MemoryBuffer>(Input.getBuffer()), Kind));
assert(!SourceMgr.getMainFileID().isInvalid() &&
"Couldn't establish MainFileID!");
return true;
OpenPOWER on IntegriCloud