mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-28 06:00:28 +00:00
Remove unnecessary conditions as suggested by clang-tidy. NFC
Patch by: Gergely Angeli! Differential Revision: https://reviews.llvm.org/D31936 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301807 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4e5c5db786
commit
4d5ff6d8d6
@ -213,10 +213,8 @@ VLIWPacketizerList::VLIWPacketizerList(MachineFunction &mf,
|
||||
|
||||
|
||||
VLIWPacketizerList::~VLIWPacketizerList() {
|
||||
if (VLIWScheduler)
|
||||
delete VLIWScheduler;
|
||||
if (ResourceTracker)
|
||||
delete ResourceTracker;
|
||||
delete VLIWScheduler;
|
||||
delete ResourceTracker;
|
||||
}
|
||||
|
||||
|
||||
|
@ -51,9 +51,7 @@ static LineNoCacheTy *getCache(void *Ptr) {
|
||||
}
|
||||
|
||||
SourceMgr::~SourceMgr() {
|
||||
// Delete the line # cache if allocated.
|
||||
if (LineNoCacheTy *Cache = getCache(LineNoCache))
|
||||
delete Cache;
|
||||
delete getCache(LineNoCache);
|
||||
}
|
||||
|
||||
unsigned SourceMgr::AddIncludeFile(const std::string &Filename,
|
||||
|
@ -44,7 +44,7 @@ void TargetLoweringObjectFile::Initialize(MCContext &ctx,
|
||||
const TargetMachine &TM) {
|
||||
Ctx = &ctx;
|
||||
// `Initialize` can be called more than once.
|
||||
if (Mang != nullptr) delete Mang;
|
||||
delete Mang;
|
||||
Mang = new Mangler();
|
||||
InitMCObjectFileInfo(TM.getTargetTriple(), TM.isPositionIndependent(),
|
||||
TM.getCodeModel(), *Ctx);
|
||||
|
Loading…
Reference in New Issue
Block a user