Allow the user to disable the internalize pass

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5792 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-04-16 21:43:22 +00:00
parent 25219a76fe
commit dabaa46c66

View File

@ -52,6 +52,10 @@ Libraries("l", cl::desc("Specify libraries to link to"), cl::Prefix,
static cl::opt<bool>
Strip("s", cl::desc("Strip symbol info from executable"));
static cl::opt<bool>
NoInternalize("disable-internalize",
cl::desc("Do not mark all symbols as internal"));
// FileExists - Return true if the specified string is an openable file...
static inline bool FileExists(const std::string &FN) {
@ -153,10 +157,13 @@ int main(int argc, char **argv) {
//
Passes.add(createFunctionResolvingPass());
// Now that composite has been compiled, scan through the module, looking for
// a main function. If main is defined, mark all other functions internal.
//
Passes.add(createInternalizePass());
if (!NoInternalize) {
// Now that composite has been compiled, scan through the module, looking
// for a main function. If main is defined, mark all other functions
// internal.
//
Passes.add(createInternalizePass());
}
// Now that we have optimized the program, discard unreachable functions...
//