Eliminated the Unique class in favor of NonCopyable and NonCopyableV

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2001-07-23 18:26:21 +00:00
parent 57dbb3ad63
commit 4bc3daaa3f
10 changed files with 61 additions and 84 deletions

View File

@@ -120,7 +120,7 @@ public:
unsigned int getStorageSize(const TargetMachine& tmi) const {
if (layoutCache->targetInfo && *layoutCache->targetInfo != tmi) {
if (layoutCache->targetInfo && layoutCache->targetInfo != &tmi) {
// target machine has changed (hey it could happen). discard cached info.
ResetCachedInfo();
layoutCache->targetInfo = &tmi;
@@ -134,7 +134,7 @@ public:
}
unsigned int getElementOffset(int i, const TargetMachine& tmi) const {
// target machine has changed (hey it could happen). discard cached info.
if (layoutCache->targetInfo && *layoutCache->targetInfo != tmi)
if (layoutCache->targetInfo && layoutCache->targetInfo != &tmi)
ResetCachedInfo();
if (layoutCache->memberOffsets[i] < 0) {