From 404ecce8903f83271c82e368c834a9697799c296 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Wed, 20 Mar 2013 22:34:33 +0000 Subject: Remove unused field in DICompileUnit git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177590 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/IR/DIBuilder.cpp | 1 - lib/IR/DebugInfo.cpp | 18 +++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) (limited to 'lib') diff --git a/lib/IR/DIBuilder.cpp b/lib/IR/DIBuilder.cpp index 4d31fd56cd..8790fb62b2 100644 --- a/lib/IR/DIBuilder.cpp +++ b/lib/IR/DIBuilder.cpp @@ -93,7 +93,6 @@ void DIBuilder::createCompileUnit(unsigned Lang, StringRef Filename, Value *Elts[] = { GetTagConstant(VMContext, dwarf::DW_TAG_compile_unit), - Constant::getNullValue(Type::getInt32Ty(VMContext)), ConstantInt::get(Type::getInt32Ty(VMContext), Lang), createFile(Filename, Directory), MDString::get(VMContext, Producer), diff --git a/lib/IR/DebugInfo.cpp b/lib/IR/DebugInfo.cpp index 897ebb5051..e236e1877d 100644 --- a/lib/IR/DebugInfo.cpp +++ b/lib/IR/DebugInfo.cpp @@ -417,7 +417,7 @@ bool DICompileUnit::Verify() const { if (N.empty()) return false; // It is possible that directory and produce string is empty. - return DbgNode->getNumOperands() == 13; + return DbgNode->getNumOperands() == 12; } /// Verify - Verify that an ObjC property is well formed. @@ -690,38 +690,38 @@ StringRef DIScope::getDirectory() const { } DIArray DICompileUnit::getEnumTypes() const { - if (!DbgNode || DbgNode->getNumOperands() < 13) + if (!DbgNode || DbgNode->getNumOperands() < 12) return DIArray(); - if (MDNode *N = dyn_cast_or_null(DbgNode->getOperand(8))) + if (MDNode *N = dyn_cast_or_null(DbgNode->getOperand(7))) return DIArray(N); return DIArray(); } DIArray DICompileUnit::getRetainedTypes() const { - if (!DbgNode || DbgNode->getNumOperands() < 13) + if (!DbgNode || DbgNode->getNumOperands() < 12) return DIArray(); - if (MDNode *N = dyn_cast_or_null(DbgNode->getOperand(9))) + if (MDNode *N = dyn_cast_or_null(DbgNode->getOperand(8))) return DIArray(N); return DIArray(); } DIArray DICompileUnit::getSubprograms() const { - if (!DbgNode || DbgNode->getNumOperands() < 13) + if (!DbgNode || DbgNode->getNumOperands() < 12) return DIArray(); - if (MDNode *N = dyn_cast_or_null(DbgNode->getOperand(10))) + if (MDNode *N = dyn_cast_or_null(DbgNode->getOperand(9))) return DIArray(N); return DIArray(); } DIArray DICompileUnit::getGlobalVariables() const { - if (!DbgNode || DbgNode->getNumOperands() < 13) + if (!DbgNode || DbgNode->getNumOperands() < 12) return DIArray(); - if (MDNode *N = dyn_cast_or_null(DbgNode->getOperand(11))) + if (MDNode *N = dyn_cast_or_null(DbgNode->getOperand(10))) return DIArray(N); return DIArray(); } -- cgit v1.2.3-18-g5258