forked from OSchip/llvm-project
Demote getMallocType to implementation routine in MemoryBuiltins [NFC]
This commit is contained in:
parent
07c009ed55
commit
cffd268316
|
@ -130,13 +130,6 @@ extractMallocCall(Value *I,
|
|||
return const_cast<CallInst *>(extractMallocCall((const Value *)I, GetTLI));
|
||||
}
|
||||
|
||||
/// getMallocType - Returns the PointerType resulting from the malloc call.
|
||||
/// The PointerType depends on the number of bitcast uses of the malloc call:
|
||||
/// 0: PointerType is the malloc calls' return type.
|
||||
/// 1: PointerType is the bitcast's result type.
|
||||
/// >1: Unique PointerType cannot be determined, return NULL.
|
||||
PointerType *getMallocType(const CallInst *CI, const TargetLibraryInfo *TLI);
|
||||
|
||||
/// getMallocAllocatedType - Returns the Type allocated by malloc call.
|
||||
/// The Type depends on the number of bitcast uses of the malloc call:
|
||||
/// 0: PointerType is the malloc calls' return type.
|
||||
|
|
|
@ -373,8 +373,8 @@ static Value *computeArraySize(const CallInst *CI, const DataLayout &DL,
|
|||
/// 0: PointerType is the calls' return type.
|
||||
/// 1: PointerType is the bitcast's result type.
|
||||
/// >1: Unique PointerType cannot be determined, return NULL.
|
||||
PointerType *llvm::getMallocType(const CallInst *CI,
|
||||
const TargetLibraryInfo *TLI) {
|
||||
static PointerType *getMallocType(const CallInst *CI,
|
||||
const TargetLibraryInfo *TLI) {
|
||||
assert(isMallocLikeFn(CI, TLI) && "getMallocType and not malloc call");
|
||||
|
||||
PointerType *MallocType = nullptr;
|
||||
|
|
Loading…
Reference in New Issue