Avoid using DIDescriptor.isNull().

This is a first step towards eliminating unncessary constructor checks in light weight DIDescriptor wrappers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97947 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel
2010-03-08 18:25:48 +00:00
parent fab4a25d46
commit d8cc5d5256
8 changed files with 128 additions and 163 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[] = {