summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorShiva Chen <shiva0217@gmail.com>2018-07-24 02:57:11 +0000
committerShiva Chen <shiva0217@gmail.com>2018-07-24 02:57:11 +0000
commit0ed11a979298453c73a489441152b470a2cd742e (patch)
tree10672170ae084ba159a00aaf834efe7d78c317e2 /clang/lib/CodeGen
parentb8ab7e811b9f83715a8240c26fe43f2d82e40470 (diff)
downloadbcm5719-llvm-0ed11a979298453c73a489441152b470a2cd742e.tar.gz
bcm5719-llvm-0ed11a979298453c73a489441152b470a2cd742e.zip
Revert "[DebugInfo] Generate debug information for labels. (Fix PR37395)"
This reverts commit 4288dd3bf082482e02c8a044c611c18168cb0180. llvm-svn: 337803
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp26
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.h3
-rw-r--r--clang/lib/CodeGen/CGStmt.cpp10
3 files changed, 0 insertions, 39 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index a9d463cfb52..097a1e04304 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -3729,32 +3729,6 @@ CGDebugInfo::EmitDeclareOfAutoVariable(const VarDecl *VD, llvm::Value *Storage,
return EmitDeclare(VD, Storage, llvm::None, Builder);
}
-void CGDebugInfo::EmitLabel(const LabelDecl *D, CGBuilderTy &Builder) {
- assert(DebugKind >= codegenoptions::LimitedDebugInfo);
- assert(!LexicalBlockStack.empty() && "Region stack mismatch, stack empty!");
-
- if (D->hasAttr<NoDebugAttr>())
- return;
-
- auto *Scope = cast<llvm::DIScope>(LexicalBlockStack.back());
- llvm::DIFile *Unit = getOrCreateFile(D->getLocation());
-
- // Get location information.
- unsigned Line = getLineNumber(D->getLocation());
- unsigned Column = getColumnNumber(D->getLocation());
-
- StringRef Name = D->getName();
-
- // Create the descriptor for the label.
- auto *L =
- DBuilder.createLabel(Scope, Name, Unit, Line, CGM.getLangOpts().Optimize);
-
- // Insert an llvm.dbg.label into the current block.
- DBuilder.insertLabel(L,
- llvm::DebugLoc::get(Line, Column, Scope, CurInlinedAt),
- Builder.GetInsertBlock());
-}
-
llvm::DIType *CGDebugInfo::CreateSelfType(const QualType &QualTy,
llvm::DIType *Ty) {
llvm::DIType *CachedTy = getTypeOrNull(QualTy);
diff --git a/clang/lib/CodeGen/CGDebugInfo.h b/clang/lib/CodeGen/CGDebugInfo.h
index 0047a07d9d9..e632806138f 100644
--- a/clang/lib/CodeGen/CGDebugInfo.h
+++ b/clang/lib/CodeGen/CGDebugInfo.h
@@ -399,9 +399,6 @@ public:
llvm::Value *AI,
CGBuilderTy &Builder);
- /// Emit call to \c llvm.dbg.label for an label.
- void EmitLabel(const LabelDecl *D, CGBuilderTy &Builder);
-
/// Emit call to \c llvm.dbg.declare for an imported variable
/// declaration in a block.
void EmitDeclareOfBlockDeclRefVariable(
diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp
index e6600691eb3..79662ec0099 100644
--- a/clang/lib/CodeGen/CGStmt.cpp
+++ b/clang/lib/CodeGen/CGStmt.cpp
@@ -531,16 +531,6 @@ void CodeGenFunction::EmitLabel(const LabelDecl *D) {
}
EmitBlock(Dest.getBlock());
-
- // Emit debug info for labels.
- if (CGDebugInfo *DI = getDebugInfo()) {
- if (CGM.getCodeGenOpts().getDebugInfo() >=
- codegenoptions::LimitedDebugInfo) {
- DI->setLocation(D->getLocation());
- DI->EmitLabel(D, Builder);
- }
- }
-
incrementProfileCounter(D->getStmt());
}
OpenPOWER on IntegriCloud