r235698 - [TableGen] Clang changes for r235697 to stop leaking Expanders and Operators in SetTheory.
Craig Topper
craig.topper at gmail.com
Thu Apr 23 23:53:50 PDT 2015
Author: ctopper
Date: Fri Apr 24 01:53:50 2015
New Revision: 235698
URL: http://llvm.org/viewvc/llvm-project?rev=235698&view=rev
Log:
[TableGen] Clang changes for r235697 to stop leaking Expanders and Operators in SetTheory.
Modified:
cfe/trunk/utils/TableGen/NeonEmitter.cpp
Modified: cfe/trunk/utils/TableGen/NeonEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/NeonEmitter.cpp?rev=235698&r1=235697&r2=235698&view=diff
==============================================================================
--- cfe/trunk/utils/TableGen/NeonEmitter.cpp (original)
+++ cfe/trunk/utils/TableGen/NeonEmitter.cpp Fri Apr 24 01:53:50 2015
@@ -25,6 +25,7 @@
//===----------------------------------------------------------------------===//
#include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
@@ -1629,15 +1630,13 @@ std::pair<Type, std::string> Intrinsic::
"Different types in arguments to shuffle!");
SetTheory ST;
- LowHalf LH;
- HighHalf HH;
- MaskExpander ME(Arg1.first.getNumElements());
- Rev R(Arg1.first.getElementSizeInBits());
SetTheory::RecSet Elts;
- ST.addOperator("lowhalf", &LH);
- ST.addOperator("highhalf", &HH);
- ST.addOperator("rev", &R);
- ST.addExpander("MaskExpand", &ME);
+ ST.addOperator("lowhalf", llvm::make_unique<LowHalf>());
+ ST.addOperator("highhalf", llvm::make_unique<HighHalf>());
+ ST.addOperator("rev",
+ llvm::make_unique<Rev>(Arg1.first.getElementSizeInBits()));
+ ST.addExpander("MaskExpand",
+ llvm::make_unique<MaskExpander>(Arg1.first.getNumElements()));
ST.evaluate(DI->getArg(2), Elts, None);
std::string S = "__builtin_shufflevector(" + Arg1.second + ", " + Arg2.second;
More information about the cfe-commits
mailing list