You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.1 KiB

/*
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <stdlib.h>
void foo_with_default_visibility() __attribute__((visibility("default")));
// protected will appear as Default in the AST
void foo_with_protected_visibility() __attribute__((visibility("protected")));
// internal will appear as Hidden in the AST
void foo_with_internal_visibility() __attribute__((visibility("internal")));
void foo_with_hidden_visibility() __attribute__((visibility("hidden")));
void foo_with_used_attribute() __attribute__((used));
void foo() __attribute__((visibility("default"))) __attribute__((used));
void foo_with_default_visibility() {}
void foo_with_protected_visibility() {}
void foo_with_internal_visibility() {}
void foo_with_hidden_visibility() {}
void foo_with_used_attribute() {}
void foo() {}
void bar() {
foo_with_default_visibility();
foo_with_protected_visibility();
foo_with_internal_visibility();
foo_with_hidden_visibility();
foo_with_used_attribute();
foo();
}