diff options
| author | David Blaikie <dblaikie@gmail.com> | 2015-02-09 18:47:14 +0000 | 
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2015-02-09 18:47:14 +0000 | 
| commit | 2221aba85b57297538510708e02ee217a2656baf (patch) | |
| tree | 7ccbc5e41c5eb96575b0fe4490af233e01d131ea /clang/lib/CodeGen | |
| parent | d7e042a2acc606f1d8d7e21f3eeb1676f9da7806 (diff) | |
| download | bcm5719-llvm-2221aba85b57297538510708e02ee217a2656baf.tar.gz bcm5719-llvm-2221aba85b57297538510708e02ee217a2656baf.zip  | |
DebugInfo: Suppress the location of instructions in aggregate default arguments.
Matches the existing code for scalar default arguments. Complex default
arguments probably need the same handling too (test/fix to that coming
next).
llvm-svn: 228588
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/CGExprAgg.cpp | 5 | 
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGExprAgg.cpp b/clang/lib/CodeGen/CGExprAgg.cpp index 80b16dd5ba3..7d05d48e85d 100644 --- a/clang/lib/CodeGen/CGExprAgg.cpp +++ b/clang/lib/CodeGen/CGExprAgg.cpp @@ -1387,7 +1387,12 @@ void CodeGenFunction::EmitAggExpr(const Expr *E, AggValueSlot Slot) {    // Optimize the slot if possible.    CheckAggExprForMemSetUse(Slot, E, *this); +  bool hasDebugInfo = getDebugInfo(); +  if (isa<CXXDefaultArgExpr>(E)) +    disableDebugInfo();    AggExprEmitter(*this, Slot).Visit(const_cast<Expr*>(E)); +  if (isa<CXXDefaultArgExpr>(E) && hasDebugInfo) +    enableDebugInfo();  }  LValue CodeGenFunction::EmitAggExprToLValue(const Expr *E) {  | 

