summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-09-29 23:09:21 +0000
committerDevang Patel <dpatel@apple.com>2010-09-29 23:09:21 +0000
commit7c086227e6ae0073f5728cc096eff1406156bd86 (patch)
treea09037e762158d14d8b25f5957818aead68547c5 /clang/lib/CodeGen/CGDebugInfo.cpp
parenta3dc31d8ee58e27b03a72c4082be43fc8771f1e3 (diff)
downloadbcm5719-llvm-7c086227e6ae0073f5728cc096eff1406156bd86.tar.gz
bcm5719-llvm-7c086227e6ae0073f5728cc096eff1406156bd86.zip
Attach aritifical attribute with implicit parameters.
Radar 8493141. llvm-svn: 115104
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index e2ad3e1b56c..45a887b1bbb 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -1729,12 +1729,15 @@ void CGDebugInfo::EmitDeclare(const VarDecl *VD, unsigned Tag,
// Get location information.
unsigned Line = getLineNumber(VD->getLocation());
unsigned Column = getColumnNumber(VD->getLocation());
-
+ unsigned Flags = 0;
+ if (VD->isImplicit())
+ Flags |= llvm::DIDescriptor::FlagArtificial;
// Create the descriptor for the variable.
llvm::DIVariable D =
DebugFactory.CreateVariable(Tag, llvm::DIDescriptor(RegionStack.back()),
- VD->getName(),
- Unit, Line, Ty, CGM.getLangOptions().Optimize);
+ VD->getName(), Unit, Line, Ty,
+ CGM.getLangOptions().Optimize, Flags);
+
// Insert an llvm.dbg.declare into the current block.
llvm::Instruction *Call =
DebugFactory.InsertDeclare(Storage, D, Builder.GetInsertBlock());
OpenPOWER on IntegriCloud