diff options
author | David Blaikie <dblaikie@gmail.com> | 2015-01-18 00:12:58 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2015-01-18 00:12:58 +0000 |
commit | a81d410d4f397a35054f4056ee4c032b6b43c1d1 (patch) | |
tree | 1accaaa6871a423bd6e4adaa6ce49b309f6375eb /clang/lib/CodeGen/CGClass.cpp | |
parent | e35a6e69f22cb4086f3050d3473869304b87199d (diff) | |
download | llvm-a81d410d4f397a35054f4056ee4c032b6b43c1d1.zip llvm-a81d410d4f397a35054f4056ee4c032b6b43c1d1.tar.gz llvm-a81d410d4f397a35054f4056ee4c032b6b43c1d1.tar.bz2 |
DebugInfo: Correct the debug location of non-static data member initializers
This was causing some trouble for otherwise dead code removed in r225085
(reverted in r225361). The location being set for function arguments was
leaking out to the call which wasn't setting its own location (so a
quality bug turned into a crasher with r225085). Fix this so r225085 can
be recommitted.
llvm-svn: 226382
Diffstat (limited to 'clang/lib/CodeGen/CGClass.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGClass.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp index 92c694a..d72eda9 100644 --- a/clang/lib/CodeGen/CGClass.cpp +++ b/clang/lib/CodeGen/CGClass.cpp @@ -544,7 +544,7 @@ static void EmitMemberInitializer(CodeGenFunction &CGF, CXXCtorInitializer *MemberInit, const CXXConstructorDecl *Constructor, FunctionArgList &Args) { - ApplyDebugLocation Loc(CGF, MemberInit->getMemberLocation()); + ApplyDebugLocation Loc(CGF, MemberInit->getSourceLocation()); assert(MemberInit->isAnyMemberInitializer() && "Must have member initializer!"); assert(MemberInit->getInit() && "Must have initializer!"); @@ -598,7 +598,6 @@ static void EmitMemberInitializer(CodeGenFunction &CGF, ArrayRef<VarDecl *> ArrayIndexes; if (MemberInit->getNumArrayIndices()) ArrayIndexes = MemberInit->getArrayIndexes(); - ApplyDebugLocation DL(CGF, MemberInit->getMemberLocation()); CGF.EmitInitializerForField(Field, LHS, MemberInit->getInit(), ArrayIndexes); } |