Have scoped mutexes take referenes instead of pointers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74931 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson
2009-07-07 18:33:04 +00:00
parent fd15beefee
commit a9d1f2c559
18 changed files with 76 additions and 78 deletions
+3 -3
View File
@@ -352,7 +352,7 @@ TargetData::~TargetData() {
if (!LayoutInfo.isConstructed())
return;
sys::SmartScopedLock<true> Lock(&*LayoutLock);
sys::SmartScopedLock<true> Lock(*LayoutLock);
// Remove any layouts for this TD.
LayoutInfoTy &TheMap = *LayoutInfo;
for (LayoutInfoTy::iterator I = TheMap.begin(), E = TheMap.end(); I != E; ) {
@@ -369,7 +369,7 @@ TargetData::~TargetData() {
const StructLayout *TargetData::getStructLayout(const StructType *Ty) const {
LayoutInfoTy &TheMap = *LayoutInfo;
sys::SmartScopedLock<true> Lock(&*LayoutLock);
sys::SmartScopedLock<true> Lock(*LayoutLock);
StructLayout *&SL = TheMap[LayoutKey(this, Ty)];
if (SL) return SL;
@@ -394,7 +394,7 @@ const StructLayout *TargetData::getStructLayout(const StructType *Ty) const {
void TargetData::InvalidateStructLayoutInfo(const StructType *Ty) const {
if (!LayoutInfo.isConstructed()) return; // No cache.
sys::SmartScopedLock<true> Lock(&*LayoutLock);
sys::SmartScopedLock<true> Lock(*LayoutLock);
LayoutInfoTy::iterator I = LayoutInfo->find(LayoutKey(this, Ty));
if (I == LayoutInfo->end()) return;