diff options
| author | Owen Anderson <resistor@mac.com> | 2009-07-07 18:33:04 +0000 |
|---|---|---|
| committer | Owen Anderson <resistor@mac.com> | 2009-07-07 18:33:04 +0000 |
| commit | 5c96ef7c4e3649ee5119670455d72a320feeb283 (patch) | |
| tree | 3a1cc20ee28fc1d417ede5313460a8f678ff20b4 /llvm/lib/Target/TargetData.cpp | |
| parent | f840ed7ed4fcec895377ab86a493f4567580e638 (diff) | |
| download | bcm5719-llvm-5c96ef7c4e3649ee5119670455d72a320feeb283.tar.gz bcm5719-llvm-5c96ef7c4e3649ee5119670455d72a320feeb283.zip | |
Have scoped mutexes take referenes instead of pointers.
llvm-svn: 74931
Diffstat (limited to 'llvm/lib/Target/TargetData.cpp')
| -rw-r--r-- | llvm/lib/Target/TargetData.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/TargetData.cpp b/llvm/lib/Target/TargetData.cpp index 7b843df7422..7dfa0576434 100644 --- a/llvm/lib/Target/TargetData.cpp +++ b/llvm/lib/Target/TargetData.cpp @@ -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; |

