Avoid using DIDescriptor.isNull().

This is a first step towards eliminating checks in Descriptor constructors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97975 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel
2010-03-08 20:52:55 +00:00
parent ccb4f2d813
commit 3c91b05d2b
8 changed files with 128 additions and 162 deletions

View File

@@ -336,14 +336,14 @@ ConstantFoldMappedInstruction(const Instruction *I) {
static MDNode *UpdateInlinedAtInfo(MDNode *InsnMD, MDNode *TheCallMD) {
DILocation ILoc(InsnMD);
if (ILoc.isNull()) return InsnMD;
if (!ILoc.Verify()) return InsnMD;
DILocation CallLoc(TheCallMD);
if (CallLoc.isNull()) return InsnMD;
if (!CallLoc.Verify()) return InsnMD;
DILocation OrigLocation = ILoc.getOrigLocation();
MDNode *NewLoc = TheCallMD;
if (!OrigLocation.isNull())
if (OrigLocation.Verify())
NewLoc = UpdateInlinedAtInfo(OrigLocation.getNode(), TheCallMD);
Value *MDVs[] = {