vsk added inline comments.
================
Comment at: lib/CodeGen/CGDecl.cpp:2062
EmitStoreOfScalar(ArgVal, lv, /* isInitialization */ true);
+ ApplyDebugLocation::CreateArtificial(*this);
+ }
----------------
There are two issues here:
1) ApplyDebugLocation is a RAII helper, which means that it installs the proper
debug location in its constructor, and restores the old debug location in its
destructor. Since you are not assigning the result of the static constructor
(CreateArtificial) to anything, the ApplyDebugLocation instance is immediately
destroyed, so it's a no-op.
2) This is being applied in the wrong place, because it sets a debug location
*after* the store is emitted. The right location needs to be applied before the
store or alloca are emitted.
Repository:
rC Clang
https://reviews.llvm.org/D47097
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits