mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
Moving this function to a permanent home to prevent a dependency cycle created
by the inline heuristic. Was preventing llvm-gcc4 from building. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29278 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -401,18 +401,6 @@ inline void PATypeHolder::dropRef() {
|
|||||||
Ty->dropRef();
|
Ty->dropRef();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// get - This implements the forwarding part of the union-find algorithm for
|
|
||||||
/// abstract types. Before every access to the Type*, we check to see if the
|
|
||||||
/// type we are pointing to is forwarding to a new type. If so, we drop our
|
|
||||||
/// reference to the type.
|
|
||||||
///
|
|
||||||
inline Type* PATypeHolder::get() const {
|
|
||||||
const Type *NewTy = Ty->getForwardedType();
|
|
||||||
if (!NewTy) return const_cast<Type*>(Ty);
|
|
||||||
return *const_cast<PATypeHolder*>(this) = NewTy;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// Provide specializations of GraphTraits to be able to treat a type as a
|
// Provide specializations of GraphTraits to be able to treat a type as a
|
||||||
|
@@ -33,6 +33,25 @@ using namespace llvm;
|
|||||||
|
|
||||||
AbstractTypeUser::~AbstractTypeUser() {}
|
AbstractTypeUser::~AbstractTypeUser() {}
|
||||||
|
|
||||||
|
|
||||||
|
//===----------------------------------------------------------------------===//
|
||||||
|
// Type PATypeHolder Implementation
|
||||||
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
// This routine was moved here to resolve a cyclic dependency caused by
|
||||||
|
// inline heuristics.
|
||||||
|
|
||||||
|
/// get - This implements the forwarding part of the union-find algorithm for
|
||||||
|
/// abstract types. Before every access to the Type*, we check to see if the
|
||||||
|
/// type we are pointing to is forwarding to a new type. If so, we drop our
|
||||||
|
/// reference to the type.
|
||||||
|
///
|
||||||
|
Type* PATypeHolder::get() const {
|
||||||
|
const Type *NewTy = Ty->getForwardedType();
|
||||||
|
if (!NewTy) return const_cast<Type*>(Ty);
|
||||||
|
return *const_cast<PATypeHolder*>(this) = NewTy;
|
||||||
|
}
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// Type Class Implementation
|
// Type Class Implementation
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
Reference in New Issue
Block a user