[llvm-commits] [llvm] r136487 - /llvm/trunk/utils/TableGen/Record.cpp

David Greene greened at obbligato.org
Fri Jul 29 12:07:09 PDT 2011


Author: greened
Date: Fri Jul 29 14:07:09 2011
New Revision: 136487

URL: http://llvm.org/viewvc/llvm-project?rev=136487&view=rev
Log:
[AVX] Unique UnsetInit

Keep only one UnsetInit around.

Modified:
    llvm/trunk/utils/TableGen/Record.cpp

Modified: llvm/trunk/utils/TableGen/Record.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/Record.cpp?rev=136487&r1=136486&r2=136487&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/Record.cpp (original)
+++ llvm/trunk/utils/TableGen/Record.cpp Fri Jul 29 14:07:09 2011
@@ -443,7 +443,8 @@
 void Init::dump() const { return print(errs()); }
 
 const UnsetInit *UnsetInit::get() {
-  return new UnsetInit;
+  static const UnsetInit TheInit;
+  return &TheInit;
 }
 
 const BitInit *BitInit::get(bool V) {





More information about the llvm-commits mailing list