[cfe-commits] r153648 - /cfe/trunk/lib/Lex/ModuleMap.cpp
Benjamin Kramer
benny.kra at googlemail.com
Thu Mar 29 07:07:03 PDT 2012
Author: d0k
Date: Thu Mar 29 09:07:03 2012
New Revision: 153648
URL: http://llvm.org/viewvc/llvm-project?rev=153648&view=rev
Log:
Make ModuleMapParser own its TargetInfo, so it doesn't get leaked.
Modified:
cfe/trunk/lib/Lex/ModuleMap.cpp
Modified: cfe/trunk/lib/Lex/ModuleMap.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/ModuleMap.cpp?rev=153648&r1=153647&r2=153648&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/ModuleMap.cpp (original)
+++ cfe/trunk/lib/Lex/ModuleMap.cpp Thu Mar 29 09:07:03 2012
@@ -508,7 +508,7 @@
/// \brief Default target information, used only for string literal
/// parsing.
- TargetInfo *Target;
+ OwningPtr<TargetInfo> Target;
/// \brief Stores string data for the various string literals referenced
/// during parsing.
@@ -551,7 +551,7 @@
{
TargetOptions TargetOpts;
TargetOpts.Triple = llvm::sys::getDefaultTargetTriple();
- Target = TargetInfo::CreateTargetInfo(Diags, TargetOpts);
+ Target.reset(TargetInfo::CreateTargetInfo(Diags, TargetOpts));
Tok.clear();
consumeToken();
More information about the cfe-commits
mailing list