summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-04-16 00:42:57 +0000
committerDan Gohman <gohman@apple.com>2010-04-16 00:42:57 +0000
commitf6920033e0ad2cd1e18d52dd56d0e8a3384faf72 (patch)
treea92d6860006811aff310bffa6bfd2fe9f03a2095 /tools
parenta001b664988f759d194f3d5d880c61449219fc2e (diff)
downloadllvm-f6920033e0ad2cd1e18d52dd56d0e8a3384faf72.tar.gz
llvm-f6920033e0ad2cd1e18d52dd56d0e8a3384faf72.tar.bz2
llvm-f6920033e0ad2cd1e18d52dd56d0e8a3384faf72.tar.xz
Make things static that don't need to be referenced from outside the file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101430 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/gold/gold-plugin.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/tools/gold/gold-plugin.cpp b/tools/gold/gold-plugin.cpp
index 0e1db1bf2e..df5c5f7347 100644
--- a/tools/gold/gold-plugin.cpp
+++ b/tools/gold/gold-plugin.cpp
@@ -58,16 +58,16 @@ namespace {
}
namespace options {
- bool generate_api_file = false;
- const char *as_path = NULL;
+ static bool generate_api_file = false;
+ static const char *as_path = NULL;
// Additional options to pass into the code generator.
// Note: This array will contain all plugin options which are not claimed
// as plugin exclusive to pass to the code generator.
// For example, "generate-api-file" and "as"options are for the plugin
// use only and will not be passed.
- std::vector<std::string> extra;
+ static std::vector<std::string> extra;
- void process_plugin_option(const char* opt)
+ static void process_plugin_option(const char* opt)
{
if (opt == NULL)
return;
@@ -88,10 +88,10 @@ namespace options {
}
}
-ld_plugin_status claim_file_hook(const ld_plugin_input_file *file,
- int *claimed);
-ld_plugin_status all_symbols_read_hook(void);
-ld_plugin_status cleanup_hook(void);
+static ld_plugin_status claim_file_hook(const ld_plugin_input_file *file,
+ int *claimed);
+static ld_plugin_status all_symbols_read_hook(void);
+static ld_plugin_status cleanup_hook(void);
extern "C" ld_plugin_status onload(ld_plugin_tv *tv);
ld_plugin_status onload(ld_plugin_tv *tv) {
@@ -192,8 +192,8 @@ ld_plugin_status onload(ld_plugin_tv *tv) {
/// claim_file_hook - called by gold to see whether this file is one that
/// our plugin can handle. We'll try to open it and register all the symbols
/// with add_symbol if possible.
-ld_plugin_status claim_file_hook(const ld_plugin_input_file *file,
- int *claimed) {
+static ld_plugin_status claim_file_hook(const ld_plugin_input_file *file,
+ int *claimed) {
void *buf = NULL;
if (file->offset) {
// Gold has found what might be IR part-way inside of a file, such as
@@ -316,7 +316,7 @@ ld_plugin_status claim_file_hook(const ld_plugin_input_file *file,
/// At this point, we use get_symbols to see if any of our definitions have
/// been overridden by a native object file. Then, perform optimization and
/// codegen.
-ld_plugin_status all_symbols_read_hook(void) {
+static ld_plugin_status all_symbols_read_hook(void) {
lto_code_gen_t cg = lto_codegen_create();
for (std::list<claimed_file>::iterator I = Modules.begin(),
@@ -412,7 +412,7 @@ ld_plugin_status all_symbols_read_hook(void) {
return LDPS_OK;
}
-ld_plugin_status cleanup_hook(void) {
+static ld_plugin_status cleanup_hook(void) {
std::string ErrMsg;
for (int i = 0, e = Cleanup.size(); i != e; ++i)