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.
38 lines
1.2 KiB
38 lines
1.2 KiB
/*
|
|
* Copyright (c) 2015 - present Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD style license found in the
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
*/
|
|
|
|
#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();
|
|
}
|