brintos

brintos / llvm-project-archived public Read only

0
0
Text · 663 B · 52a8d58 Raw
25 lines · cpp
1// Tests that the member function with-in an class definition in the header unit is still implicit inline.2// RUN: rm -rf %t3// RUN: split-file %s %t4//5// RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple -xc++-user-header -emit-header-unit %t/foo.h -o %t/foo.pcm6// RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple -fmodule-file=%t/foo.pcm %t/user.cpp \7// RUN:   -emit-llvm -disable-llvm-passes -o - | FileCheck %t/user.cpp8 9//--- foo.h10class foo {11public:12    int getValue() {13        return 43;14    }15};16 17//--- user.cpp18import "foo.h";19int use() {20    foo f;21    return f.getValue();22}23 24// CHECK: define{{.*}}linkonce_odr{{.*}}@_ZN3foo8getValueEv25