Previously, annotations were only emitted for function definitions. With this change annotations are also emitted for declarations. Also, emitting function annotations is now deferred until the end so that the most up to date declaration is used which will have any inherited annotations.
11 lines
314 B
C++
11 lines
314 B
C++
// RUN: %clang_cc1 %s -S -emit-llvm -triple x86_64-unknown-linux-gnu -o - | FileCheck %s
|
|
|
|
// Test annotation attributes on destructors do not crash.
|
|
|
|
struct k {
|
|
~k() __attribute__((annotate(""))) {}
|
|
};
|
|
void m() { k(); }
|
|
|
|
// CHECK: @llvm.global.annotations = appending global [2 x { ptr, ptr, ptr, i32, ptr }] [{
|