r216707 - unique_ptrify clang::BackendConsumer::takeModule
David Blaikie
dblaikie at gmail.com
Thu Aug 28 22:08:20 PDT 2014
Author: dblaikie
Date: Fri Aug 29 00:08:19 2014
New Revision: 216707
URL: http://llvm.org/viewvc/llvm-project?rev=216707&view=rev
Log:
unique_ptrify clang::BackendConsumer::takeModule
Modified:
cfe/trunk/lib/CodeGen/CodeGenAction.cpp
Modified: cfe/trunk/lib/CodeGen/CodeGenAction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenAction.cpp?rev=216707&r1=216706&r2=216707&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenAction.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenAction.cpp Fri Aug 29 00:08:19 2014
@@ -72,7 +72,7 @@ namespace clang {
llvm::TimePassesIsEnabled = TimePasses;
}
- llvm::Module *takeModule() { return TheModule.release(); }
+ std::unique_ptr<llvm::Module> takeModule() { return std::move(TheModule); }
llvm::Module *takeLinkModule() { return LinkModule.release(); }
void HandleCXXStaticMemberVarInstantiation(VarDecl *VD) override {
@@ -576,7 +576,7 @@ void CodeGenAction::EndSourceFileAction(
BEConsumer->takeLinkModule();
// Steal the module from the consumer.
- TheModule.reset(BEConsumer->takeModule());
+ TheModule = BEConsumer->takeModule();
}
std::unique_ptr<llvm::Module> CodeGenAction::takeModule() {
More information about the cfe-commits
mailing list