mirror of
https://github.com/RPCSX/llvm.git
synced 2025-05-13 19:06:05 +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,9 +213,7 @@ VLIWPacketizerList::VLIWPacketizerList(MachineFunction &mf,
|
|||||||
|
|
||||||
|
|
||||||
VLIWPacketizerList::~VLIWPacketizerList() {
|
VLIWPacketizerList::~VLIWPacketizerList() {
|
||||||
if (VLIWScheduler)
|
|
||||||
delete VLIWScheduler;
|
delete VLIWScheduler;
|
||||||
if (ResourceTracker)
|
|
||||||
delete ResourceTracker;
|
delete ResourceTracker;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,9 +51,7 @@ static LineNoCacheTy *getCache(void *Ptr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SourceMgr::~SourceMgr() {
|
SourceMgr::~SourceMgr() {
|
||||||
// Delete the line # cache if allocated.
|
delete getCache(LineNoCache);
|
||||||
if (LineNoCacheTy *Cache = getCache(LineNoCache))
|
|
||||||
delete Cache;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned SourceMgr::AddIncludeFile(const std::string &Filename,
|
unsigned SourceMgr::AddIncludeFile(const std::string &Filename,
|
||||||
|
@ -44,7 +44,7 @@ void TargetLoweringObjectFile::Initialize(MCContext &ctx,
|
|||||||
const TargetMachine &TM) {
|
const TargetMachine &TM) {
|
||||||
Ctx = &ctx;
|
Ctx = &ctx;
|
||||||
// `Initialize` can be called more than once.
|
// `Initialize` can be called more than once.
|
||||||
if (Mang != nullptr) delete Mang;
|
delete Mang;
|
||||||
Mang = new Mangler();
|
Mang = new Mangler();
|
||||||
InitMCObjectFileInfo(TM.getTargetTriple(), TM.isPositionIndependent(),
|
InitMCObjectFileInfo(TM.getTargetTriple(), TM.isPositionIndependent(),
|
||||||
TM.getCodeModel(), *Ctx);
|
TM.getCodeModel(), *Ctx);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user