summaryrefslogtreecommitdiffstats
path: root/llvm/lib/TableGen/Record.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2015-06-04 07:40:12 +0000
committerCraig Topper <craig.topper@gmail.com>2015-06-04 07:40:12 +0000
commitb849203c948a2aa36f7f8b7679cc9351c1a92706 (patch)
tree303c0a00a87e8b66e3279088b9cc0ce3260d0c9b /llvm/lib/TableGen/Record.cpp
parentc019a57099b1bfe44fff6f0867cfd9f6bb4aed96 (diff)
downloadbcm5719-llvm-b849203c948a2aa36f7f8b7679cc9351c1a92706.tar.gz
bcm5719-llvm-b849203c948a2aa36f7f8b7679cc9351c1a92706.zip
[TableGen] Merge single prefix bit in RecordVal into PointerIntPair with Name to reduce memory usage.
llvm-svn: 239021
Diffstat (limited to 'llvm/lib/TableGen/Record.cpp')
-rw-r--r--llvm/lib/TableGen/Record.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/TableGen/Record.cpp b/llvm/lib/TableGen/Record.cpp
index 4ca3e8d34c9..a0b48ff5402 100644
--- a/llvm/lib/TableGen/Record.cpp
+++ b/llvm/lib/TableGen/Record.cpp
@@ -1532,20 +1532,20 @@ std::string DagInit::getAsString() const {
// Other implementations
//===----------------------------------------------------------------------===//
-RecordVal::RecordVal(Init *N, RecTy *T, unsigned P)
- : Name(N), Ty(T), Prefix(P) {
+RecordVal::RecordVal(Init *N, RecTy *T, bool P)
+ : NameAndPrefix(N, P), Ty(T) {
Value = UnsetInit::get()->convertInitializerTo(Ty);
assert(Value && "Cannot create unset value for current type!");
}
-RecordVal::RecordVal(const std::string &N, RecTy *T, unsigned P)
- : Name(StringInit::get(N)), Ty(T), Prefix(P) {
+RecordVal::RecordVal(const std::string &N, RecTy *T, bool P)
+ : NameAndPrefix(StringInit::get(N), P), Ty(T) {
Value = UnsetInit::get()->convertInitializerTo(Ty);
assert(Value && "Cannot create unset value for current type!");
}
const std::string &RecordVal::getName() const {
- return cast<StringInit>(Name)->getValue();
+ return cast<StringInit>(getNameInit())->getValue();
}
void RecordVal::dump() const { errs() << *this; }
OpenPOWER on IntegriCloud