mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-23 17:24:48 +00:00
add ifdef's to let people easily remove these dead api for testing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137483 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -224,7 +224,7 @@ public:
|
|||||||
static StructType *create(LLVMContext &Context, ArrayRef<Type*> Elements);
|
static StructType *create(LLVMContext &Context, ArrayRef<Type*> Elements);
|
||||||
static StructType *create(StringRef Name, Type *elt1, ...) END_WITH_NULL;
|
static StructType *create(StringRef Name, Type *elt1, ...) END_WITH_NULL;
|
||||||
|
|
||||||
|
#if 1
|
||||||
// FIXME: Remove these.
|
// FIXME: Remove these.
|
||||||
bool isAnonymous() const {return (getSubclassData() & SCDB_IsLiteral) != 0;}
|
bool isAnonymous() const {return (getSubclassData() & SCDB_IsLiteral) != 0;}
|
||||||
static StructType *createNamed(LLVMContext &Context,
|
static StructType *createNamed(LLVMContext &Context,
|
||||||
@ -236,6 +236,7 @@ public:
|
|||||||
ArrayRef<Type*> Elements,
|
ArrayRef<Type*> Elements,
|
||||||
bool isPacked = false);
|
bool isPacked = false);
|
||||||
static StructType *createNamed(StringRef Name, Type *elt1, ...) END_WITH_NULL;
|
static StructType *createNamed(StringRef Name, Type *elt1, ...) END_WITH_NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
/// StructType::get - This static method is the primary way to create a
|
/// StructType::get - This static method is the primary way to create a
|
||||||
/// literal StructType.
|
/// literal StructType.
|
||||||
|
@ -412,13 +412,6 @@ void StructType::setBody(ArrayRef<Type*> Elements, bool isPacked) {
|
|||||||
NumContainedTys = Elements.size();
|
NumContainedTys = Elements.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
StructType *StructType::createNamed(LLVMContext &Context, StringRef Name) {
|
|
||||||
StructType *ST = new (Context.pImpl->TypeAllocator) StructType(Context);
|
|
||||||
if (!Name.empty())
|
|
||||||
ST->setName(Name);
|
|
||||||
return ST;
|
|
||||||
}
|
|
||||||
|
|
||||||
void StructType::setName(StringRef Name) {
|
void StructType::setName(StringRef Name) {
|
||||||
if (Name == getName()) return;
|
if (Name == getName()) return;
|
||||||
|
|
||||||
@ -528,7 +521,7 @@ StructType *StructType::create(StringRef Name, Type *type, ...) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if 1
|
||||||
|
|
||||||
StructType *StructType::createNamed(LLVMContext &Context, StringRef Name,
|
StructType *StructType::createNamed(LLVMContext &Context, StringRef Name,
|
||||||
ArrayRef<Type*> Elements, bool isPacked) {
|
ArrayRef<Type*> Elements, bool isPacked) {
|
||||||
@ -537,6 +530,14 @@ StructType *StructType::createNamed(LLVMContext &Context, StringRef Name,
|
|||||||
return ST;
|
return ST;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StructType *StructType::createNamed(LLVMContext &Context, StringRef Name) {
|
||||||
|
StructType *ST = new (Context.pImpl->TypeAllocator) StructType(Context);
|
||||||
|
if (!Name.empty())
|
||||||
|
ST->setName(Name);
|
||||||
|
return ST;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
StructType *StructType::createNamed(StringRef Name, ArrayRef<Type*> Elements,
|
StructType *StructType::createNamed(StringRef Name, ArrayRef<Type*> Elements,
|
||||||
bool isPacked) {
|
bool isPacked) {
|
||||||
assert(!Elements.empty() &&
|
assert(!Elements.empty() &&
|
||||||
@ -556,6 +557,7 @@ StructType *StructType::createNamed(StringRef Name, Type *type, ...) {
|
|||||||
}
|
}
|
||||||
return llvm::StructType::createNamed(Ctx, Name, StructFields);
|
return llvm::StructType::createNamed(Ctx, Name, StructFields);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
StringRef StructType::getName() const {
|
StringRef StructType::getName() const {
|
||||||
assert(!isLiteral() && "Literal structs never have names");
|
assert(!isLiteral() && "Literal structs never have names");
|
||||||
|
Reference in New Issue
Block a user