2014-10-24 08:49:29 +08:00
|
|
|
// REQUIRES: x86-registered-target
|
2019-06-05 11:17:11 +08:00
|
|
|
// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -O1 -fno-experimental-new-pass-manager -fmerge-functions -emit-llvm -o - -x c++ < %s | FileCheck %s -implicit-check-not=_ZN1A1gEiPi
|
2014-10-24 08:49:29 +08:00
|
|
|
|
|
|
|
// Basic functionality test. Function merging doesn't kick in on functions that
|
|
|
|
// are too simple.
|
|
|
|
|
|
|
|
struct A {
|
|
|
|
virtual int f(int x, int *p) { return x ? *p : 1; }
|
|
|
|
virtual int g(int x, int *p) { return x ? *p : 1; }
|
|
|
|
} a;
|
|
|
|
|
2019-01-12 02:51:02 +08:00
|
|
|
// CHECK: define {{.*}} @_ZN1A1fEiPi
|