Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Side by Side Diff: tests/toolchain/dwarf_method_ptr.cc

Issue 1021303003: Enable using the toolchain (llvm) provided FileCheck. (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: nacl_clang Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « site_scons/site_tools/naclsdk.py ('k') | tests/toolchain/nacl.scons » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file.
5 */
6
7 /* Test that dwarf info for method pointers is preserved after linking.
8 *
9 */
10
11 class TestClass {
12 public:
13 int foo() { return 42; }
14 };
15
16 typedef int (TestClass::*method_ptr)();
17
18 __attribute__((noinline)) static int foo(TestClass *dwarf_test_method_ptr_param,
19 method_ptr *mp) {
20 // CHECK-DAG: (DW_TAG_formal_parameter)
21 // CHECK-DAG: DW_AT_location
22 // CHECK: DW_AT_name{{.*}} dwarf_test_method_ptr_param
23 // CHECK-NEXT: {{.*}}DW_AT_decl_file{{.*}} : 1
24 // CHECK-NEXT: {{.*}}DW_AT_decl_line{{.*}} : 18
25 return (dwarf_test_method_ptr_param->**mp)();
26 }
27
28 int caller(TestClass *my_test_param) {
29 method_ptr mp = &TestClass::foo;
30 return foo(my_test_param, &mp);
31 }
32
33 int main() {
34 TestClass TC;
35 int ret = caller(&TC);
36 return ret;
37 }
OLDNEW
« no previous file with comments | « site_scons/site_tools/naclsdk.py ('k') | tests/toolchain/nacl.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698