summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-12-29 22:53:52 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-12-29 22:53:52 +0000
commit4d5c7288cc98333484036922976f14ded14573de (patch)
treeb5814577e2b03985b8f65a604c743191fd295a91 /clang
parentcab512d6290a578600c886e097157985c3c4baca (diff)
downloadbcm5719-llvm-4d5c7288cc98333484036922976f14ded14573de.tar.gz
bcm5719-llvm-4d5c7288cc98333484036922976f14ded14573de.zip
PR22051: Missing debug location on calls in dtor thunks in Windows.
llvm-svn: 224963
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/CodeGen/CGVTables.cpp2
-rw-r--r--clang/test/CodeGenCXX/debug-info-windows-dtor.cpp22
2 files changed, 23 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGVTables.cpp b/clang/lib/CodeGen/CGVTables.cpp
index 1aff3469782..acb2a56fab3 100644
--- a/clang/lib/CodeGen/CGVTables.cpp
+++ b/clang/lib/CodeGen/CGVTables.cpp
@@ -214,7 +214,7 @@ void CodeGenFunction::StartThunk(llvm::Function *Fn, GlobalDecl GD,
// Start defining the function.
StartFunction(GlobalDecl(), ResultType, Fn, FnInfo, FunctionArgs,
- MD->getLocation(), SourceLocation());
+ MD->getLocation(), MD->getLocation());
// Since we didn't pass a GlobalDecl to StartFunction, do this ourselves.
CGM.getCXXABI().EmitInstanceFunctionProlog(*this);
diff --git a/clang/test/CodeGenCXX/debug-info-windows-dtor.cpp b/clang/test/CodeGenCXX/debug-info-windows-dtor.cpp
new file mode 100644
index 00000000000..ddf4ac7ae5d
--- /dev/null
+++ b/clang/test/CodeGenCXX/debug-info-windows-dtor.cpp
@@ -0,0 +1,22 @@
+// RUN: %clang_cc1 -triple i386-unknown-windows-msvc -std=c++11 -emit-llvm -gline-tables-only %s -o - | FileCheck %s
+
+struct A {
+ virtual ~A() {}
+};
+
+struct B {
+ virtual ~B() {}
+};
+
+template<typename T>
+struct AB: A, B {
+};
+
+template struct AB<int>;
+
+// CHECK-LABEL: define {{.*}}@"\01??_E?$AB@H@@W3AEPAXI@Z"
+// CHECK: call {{.*}}@"\01??_G?$AB@H@@UAEPAXI@Z"({{.*}}) #{{[0-9]*}}, !dbg [[THUNK_LOC:![0-9]*]]
+// CHECK-LABEL: define
+
+// CHECK: [[THUNK_VEC_DEL_DTOR:![0-9]*]] = {{.*}} @"\01??_E?$AB@H@@W3AEPAXI@Z", {{.*}}; [ DW_TAG_subprogram ]
+// CHECK: [[THUNK_LOC]] = !{i32 15, i32 0, [[THUNK_VEC_DEL_DTOR]], null}
OpenPOWER on IntegriCloud