bolt/deps/llvm-18.1.8/clang/test/Interpreter/execute-weak.cpp

14 lines
325 B
C++
Raw Normal View History

2025-02-14 19:21:04 +01:00
// UNSUPPORTED: system-aix, system-windows
// RUN: cat %s | clang-repl | FileCheck %s
extern "C" int printf(const char *, ...);
int __attribute__((weak)) bar() { return 42; }
auto r4 = printf("bar() = %d\n", bar());
// CHECK: bar() = 42
int a = 12;
static __typeof(a) b __attribute__((__weakref__("a")));
int c = b;
%quit