mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Cleanup. Remove redundant llvm:: , we don't need them since we're inside
namespace llvm already. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68774 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3584a47588
commit
cb8c4778d3
@ -323,7 +323,7 @@ public:
|
||||
return Insert(GetElementPtrInst::Create(Ptr, Idx), Name);
|
||||
}
|
||||
Value *CreateConstGEP1_32(Value *Ptr, unsigned Idx0, const char *Name = "") {
|
||||
llvm::Value *Idx = ConstantInt::get(llvm::Type::Int32Ty, Idx0);
|
||||
Value *Idx = ConstantInt::get(Type::Int32Ty, Idx0);
|
||||
|
||||
if (Constant *PC = dyn_cast<Constant>(Ptr))
|
||||
return Folder.CreateGetElementPtr(PC, &Idx, 1);
|
||||
@ -332,9 +332,9 @@ public:
|
||||
}
|
||||
Value *CreateConstGEP2_32(Value *Ptr, unsigned Idx0, unsigned Idx1,
|
||||
const char *Name = "") {
|
||||
llvm::Value *Idxs[] = {
|
||||
ConstantInt::get(llvm::Type::Int32Ty, Idx0),
|
||||
ConstantInt::get(llvm::Type::Int32Ty, Idx1)
|
||||
Value *Idxs[] = {
|
||||
ConstantInt::get(Type::Int32Ty, Idx0),
|
||||
ConstantInt::get(Type::Int32Ty, Idx1)
|
||||
};
|
||||
|
||||
if (Constant *PC = dyn_cast<Constant>(Ptr))
|
||||
@ -343,7 +343,7 @@ public:
|
||||
return Insert(GetElementPtrInst::Create(Ptr, Idxs, Idxs+2), Name);
|
||||
}
|
||||
Value *CreateConstGEP1_64(Value *Ptr, uint64_t Idx0, const char *Name = "") {
|
||||
llvm::Value *Idx = ConstantInt::get(llvm::Type::Int64Ty, Idx0);
|
||||
Value *Idx = ConstantInt::get(Type::Int64Ty, Idx0);
|
||||
|
||||
if (Constant *PC = dyn_cast<Constant>(Ptr))
|
||||
return Folder.CreateGetElementPtr(PC, &Idx, 1);
|
||||
@ -352,9 +352,9 @@ public:
|
||||
}
|
||||
Value *CreateConstGEP2_64(Value *Ptr, uint64_t Idx0, uint64_t Idx1,
|
||||
const char *Name = "") {
|
||||
llvm::Value *Idxs[] = {
|
||||
ConstantInt::get(llvm::Type::Int64Ty, Idx0),
|
||||
ConstantInt::get(llvm::Type::Int64Ty, Idx1)
|
||||
Value *Idxs[] = {
|
||||
ConstantInt::get(Type::Int64Ty, Idx0),
|
||||
ConstantInt::get(Type::Int64Ty, Idx1)
|
||||
};
|
||||
|
||||
if (Constant *PC = dyn_cast<Constant>(Ptr))
|
||||
@ -367,19 +367,19 @@ public:
|
||||
}
|
||||
Value *CreateGlobalString(const char *Str = "", const char *Name = "") {
|
||||
Constant *StrConstant = ConstantArray::get(Str, true);
|
||||
GlobalVariable *gv = new llvm::GlobalVariable(StrConstant->getType(),
|
||||
true,
|
||||
GlobalValue::InternalLinkage,
|
||||
StrConstant,
|
||||
"",
|
||||
BB->getParent()->getParent(),
|
||||
false);
|
||||
GlobalVariable *gv = new GlobalVariable(StrConstant->getType(),
|
||||
true,
|
||||
GlobalValue::InternalLinkage,
|
||||
StrConstant,
|
||||
"",
|
||||
BB->getParent()->getParent(),
|
||||
false);
|
||||
gv->setName(Name);
|
||||
return gv;
|
||||
}
|
||||
Value *CreateGlobalStringPtr(const char *Str = "", const char *Name = "") {
|
||||
Value *gv = CreateGlobalString(Str, Name);
|
||||
Value *zero = llvm::ConstantInt::get(llvm::Type::Int32Ty, 0);
|
||||
Value *zero = ConstantInt::get(Type::Int32Ty, 0);
|
||||
Value *Args[] = { zero, zero };
|
||||
return CreateGEP(gv, Args, Args+2, Name);
|
||||
}
|
||||
@ -671,13 +671,13 @@ public:
|
||||
|
||||
/// CreateIsNull - Return an i1 value testing if \arg Arg is null.
|
||||
Value *CreateIsNull(Value *Arg, const char *Name = "") {
|
||||
return CreateICmpEQ(Arg, llvm::Constant::getNullValue(Arg->getType()),
|
||||
return CreateICmpEQ(Arg, Constant::getNullValue(Arg->getType()),
|
||||
Name);
|
||||
}
|
||||
|
||||
/// CreateIsNotNull - Return an i1 value testing if \arg Arg is not null.
|
||||
Value *CreateIsNotNull(Value *Arg, const char *Name = "") {
|
||||
return CreateICmpNE(Arg, llvm::Constant::getNullValue(Arg->getType()),
|
||||
return CreateICmpNE(Arg, Constant::getNullValue(Arg->getType()),
|
||||
Name);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user