Keep only two copies of BitInit: one for true and one for false.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136488
91177308-0d34-0410-b5e6-
96231b3b80d8
+
//===- Record.cpp - Record implementation ---------------------------------===//
//
// The LLVM Compiler Infrastructure
}
const BitInit *BitInit::get(bool V) {
- return new BitInit(V);
+ static const BitInit True(true);
+ static const BitInit False(false);
+
+ return V ? &True : &False;
}
const BitsInit *BitsInit::get(ArrayRef<const Init *> Range) {