summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-03-02 17:54:58 +0000
committerDevang Patel <dpatel@apple.com>2011-03-02 17:54:58 +0000
commit3da5cb2d6e582ab3acb5dd0d2fd8ab31922750be (patch)
tree0d34299ab6fecd3ed336d3a1e2a12b777922c9b3 /lib/CodeGen/CGDebugInfo.cpp
parentb6744efecba58792cce20d2d7b9ee39927c5422e (diff)
downloadclang-3da5cb2d6e582ab3acb5dd0d2fd8ab31922750be.tar.gz
Revert r126794.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126848 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index e6d2af3a53..8038ce3c60 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/lib/CodeGen/CGDebugInfo.cpp
@@ -1750,8 +1750,7 @@ llvm::DIType CGDebugInfo::EmitTypeForVarWithBlocksAttr(const ValueDecl *VD,
/// EmitDeclare - Emit local variable declaration debug info.
void CGDebugInfo::EmitDeclare(const VarDecl *VD, unsigned Tag,
- llvm::Value *Storage,
- unsigned ArgNo, CGBuilderTy &Builder) {
+ llvm::Value *Storage, CGBuilderTy &Builder) {
assert(!RegionStack.empty() && "Region stack mismatch, stack empty!");
llvm::DIFile Unit = getOrCreateFile(VD->getLocation());
@@ -1811,7 +1810,7 @@ void CGDebugInfo::EmitDeclare(const VarDecl *VD, unsigned Tag,
DBuilder.createComplexVariable(Tag,
llvm::DIDescriptor(RegionStack.back()),
VD->getName(), Unit, Line, Ty,
- addr.data(), addr.size(), ArgNo);
+ addr.data(), addr.size());
// Insert an llvm.dbg.declare into the current block.
llvm::Instruction *Call =
@@ -1824,7 +1823,7 @@ void CGDebugInfo::EmitDeclare(const VarDecl *VD, unsigned Tag,
llvm::DIVariable D =
DBuilder.createLocalVariable(Tag, llvm::DIDescriptor(Scope),
Name, Unit, Line, Ty,
- CGM.getLangOptions().Optimize, Flags, ArgNo);
+ CGM.getLangOptions().Optimize, Flags);
// Insert an llvm.dbg.declare into the current block.
llvm::Instruction *Call =
@@ -1854,8 +1853,7 @@ void CGDebugInfo::EmitDeclare(const VarDecl *VD, unsigned Tag,
llvm::DIVariable D =
DBuilder.createLocalVariable(Tag, llvm::DIDescriptor(Scope),
FieldName, Unit, Line, FieldTy,
- CGM.getLangOptions().Optimize, Flags,
- ArgNo);
+ CGM.getLangOptions().Optimize, Flags);
// Insert an llvm.dbg.declare into the current block.
llvm::Instruction *Call =
@@ -1929,7 +1927,7 @@ void CGDebugInfo::EmitDeclare(const VarDecl *VD, unsigned Tag,
void CGDebugInfo::EmitDeclareOfAutoVariable(const VarDecl *VD,
llvm::Value *Storage,
CGBuilderTy &Builder) {
- EmitDeclare(VD, llvm::dwarf::DW_TAG_auto_variable, Storage, 0, Builder);
+ EmitDeclare(VD, llvm::dwarf::DW_TAG_auto_variable, Storage, Builder);
}
void CGDebugInfo::EmitDeclareOfBlockDeclRefVariable(
@@ -1942,9 +1940,8 @@ void CGDebugInfo::EmitDeclareOfBlockDeclRefVariable(
/// EmitDeclareOfArgVariable - Emit call to llvm.dbg.declare for an argument
/// variable declaration.
void CGDebugInfo::EmitDeclareOfArgVariable(const VarDecl *VD, llvm::Value *AI,
- unsigned ArgNo,
CGBuilderTy &Builder) {
- EmitDeclare(VD, llvm::dwarf::DW_TAG_arg_variable, AI, ArgNo, Builder);
+ EmitDeclare(VD, llvm::dwarf::DW_TAG_arg_variable, AI, Builder);
}
namespace {
@@ -2093,8 +2090,7 @@ void CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable(const CGBlockInfo &block,
DBuilder.createLocalVariable(llvm::dwarf::DW_TAG_arg_variable,
llvm::DIDescriptor(scope),
name, tunit, line, type,
- CGM.getLangOptions().Optimize, flags,
- cast<llvm::Argument>(addr)->getArgNo() + 1);
+ CGM.getLangOptions().Optimize, flags);
// Insert an llvm.dbg.value into the current block.
llvm::Instruction *declare =