blob: 0e720bd06ead7d5298575fa5d7a84f5db1a2d011 [file] [log] [blame]
Chris Lattner825937d2003-09-20 02:42:54 +00001//===- llvm-link.cpp - Low-level LLVM linker ------------------------------===//
Misha Brukman650ba8e2005-04-22 00:00:37 +00002//
John Criswell09344dc2003-10-20 17:47:21 +00003// The LLVM Compiler Infrastructure
4//
Chris Lattner345353d2007-12-29 20:44:31 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Misha Brukman650ba8e2005-04-22 00:00:37 +00007//
John Criswell09344dc2003-10-20 17:47:21 +00008//===----------------------------------------------------------------------===//
Chris Lattner9d810e02001-10-13 07:06:23 +00009//
10// This utility may be invoked in the following manner:
Misha Brukmancf0c7442003-09-15 18:34:34 +000011// llvm-link a.bc b.bc c.bc -o x.bc
Chris Lattner9d810e02001-10-13 07:06:23 +000012//
13//===----------------------------------------------------------------------===//
14
Benjamin Kramer0a446fd2015-03-01 21:28:53 +000015#include "llvm/ADT/STLExtras.h"
Chris Lattner27936992007-05-06 05:13:17 +000016#include "llvm/Bitcode/ReaderWriter.h"
Rafael Espindola0d68b4c2015-03-30 21:36:43 +000017#include "llvm/IR/AutoUpgrade.h"
Rafael Espindolad12b4a32014-10-25 04:06:10 +000018#include "llvm/IR/DiagnosticInfo.h"
19#include "llvm/IR/DiagnosticPrinter.h"
Chandler Carruth9fb823b2013-01-02 11:36:10 +000020#include "llvm/IR/LLVMContext.h"
21#include "llvm/IR/Module.h"
Teresa Johnson26ab5772016-03-15 00:04:37 +000022#include "llvm/IR/ModuleSummaryIndex.h"
Chandler Carruth5ad5f152014-01-13 09:26:24 +000023#include "llvm/IR/Verifier.h"
Chandler Carruthe60e57b2013-03-26 02:25:37 +000024#include "llvm/IRReader/IRReader.h"
Teresa Johnson26ab5772016-03-15 00:04:37 +000025#include "llvm/Linker/Linker.h"
26#include "llvm/Object/ModuleSummaryIndexObjectFile.h"
Reid Spencer7c16caa2004-09-01 22:55:40 +000027#include "llvm/Support/CommandLine.h"
Benjamin Kramerd59664f2014-04-29 23:26:49 +000028#include "llvm/Support/FileSystem.h"
Chandler Carruth4d88a1c2012-12-04 10:44:52 +000029#include "llvm/Support/ManagedStatic.h"
Michael J. Spencer447762d2010-11-29 18:16:10 +000030#include "llvm/Support/Path.h"
Chandler Carruth4d88a1c2012-12-04 10:44:52 +000031#include "llvm/Support/PrettyStackTrace.h"
32#include "llvm/Support/Signals.h"
Chandler Carruthe60e57b2013-03-26 02:25:37 +000033#include "llvm/Support/SourceMgr.h"
Chandler Carruth4d88a1c2012-12-04 10:44:52 +000034#include "llvm/Support/SystemUtils.h"
35#include "llvm/Support/ToolOutputFile.h"
Mehdi Amini8d051852016-03-19 00:40:31 +000036#include "llvm/Transforms/Utils/FunctionImportUtils.h"
37
Chris Lattner9d810e02001-10-13 07:06:23 +000038#include <memory>
Brian Gaeke960707c2003-11-11 22:41:34 +000039using namespace llvm;
40
Chris Lattnerf5cad152002-07-22 02:10:13 +000041static cl::list<std::string>
42InputFilenames(cl::Positional, cl::OneOrMore,
Gabor Greife16561c2007-07-05 17:07:56 +000043 cl::desc("<input bitcode files>"));
Chris Lattnerf5cad152002-07-22 02:10:13 +000044
Duncan P. N. Exon Smithe8681232015-04-22 04:11:00 +000045static cl::list<std::string> OverridingInputs(
46 "override", cl::ZeroOrMore, cl::value_desc("filename"),
47 cl::desc(
48 "input bitcode file which can override previously defined symbol(s)"));
49
Teresa Johnsonc7ed52f2015-11-03 00:14:15 +000050// Option to simulate function importing for testing. This enables using
51// llvm-link to simulate ThinLTO backend processes.
52static cl::list<std::string> Imports(
53 "import", cl::ZeroOrMore, cl::value_desc("function:filename"),
54 cl::desc("Pair of function name and filename, where function should be "
55 "imported from bitcode in filename"));
56
Teresa Johnson26ab5772016-03-15 00:04:37 +000057// Option to support testing of function importing. The module summary
Teresa Johnsonc7ed52f2015-11-03 00:14:15 +000058// must be specified in the case were we request imports via the -import
59// option, as well as when compiling any module with functions that may be
60// exported (imported by a different llvm-link -import invocation), to ensure
61// consistent promotion and renaming of locals.
Teresa Johnson26ab5772016-03-15 00:04:37 +000062static cl::opt<std::string>
63 SummaryIndex("summary-index", cl::desc("Module summary index filename"),
64 cl::init(""), cl::value_desc("filename"));
Teresa Johnsonc7ed52f2015-11-03 00:14:15 +000065
Chris Lattnerf5cad152002-07-22 02:10:13 +000066static cl::opt<std::string>
67OutputFilename("o", cl::desc("Override output filename"), cl::init("-"),
68 cl::value_desc("filename"));
69
Dan Gohman61a87962009-08-25 15:34:52 +000070static cl::opt<bool>
Artem Belevich020d4fb2015-09-01 17:55:55 +000071Internalize("internalize", cl::desc("Internalize linked symbols"));
72
73static cl::opt<bool>
Duncan P. N. Exon Smith5ab2be02016-04-17 03:58:21 +000074 DisableDITypeMap("disable-debug-info-type-map",
75 cl::desc("Don't use a uniquing type map for debug info"));
76
77static cl::opt<bool>
Artem Belevich020d4fb2015-09-01 17:55:55 +000078OnlyNeeded("only-needed", cl::desc("Link only needed symbols"));
79
80static cl::opt<bool>
Dan Gohman61a87962009-08-25 15:34:52 +000081Force("f", cl::desc("Enable binary output on terminals"));
Chris Lattnerf5cad152002-07-22 02:10:13 +000082
83static cl::opt<bool>
Dan Gohman2b09de92009-09-15 15:35:07 +000084OutputAssembly("S",
85 cl::desc("Write output as LLVM assembly"), cl::Hidden);
86
87static cl::opt<bool>
Chris Lattnerf5cad152002-07-22 02:10:13 +000088Verbose("v", cl::desc("Print information about actions taken"));
89
90static cl::opt<bool>
91DumpAsm("d", cl::desc("Print assembly as linked"), cl::Hidden);
92
Eli Bendersky7da92ed2014-02-20 22:19:24 +000093static cl::opt<bool>
94SuppressWarnings("suppress-warnings", cl::desc("Suppress all linking warnings"),
95 cl::init(false));
96
Duncan P. N. Exon Smith8a7b84b2015-04-15 03:14:06 +000097static cl::opt<bool> PreserveBitcodeUseListOrder(
98 "preserve-bc-uselistorder",
99 cl::desc("Preserve use-list order when writing LLVM bitcode."),
100 cl::init(true), cl::Hidden);
101
102static cl::opt<bool> PreserveAssemblyUseListOrder(
103 "preserve-ll-uselistorder",
104 cl::desc("Preserve use-list order when writing LLVM assembly."),
105 cl::init(false), cl::Hidden);
106
Rafael Espindolad233b062014-08-26 17:29:46 +0000107// Read the specified bitcode file in and return it. This routine searches the
108// link path for the specified file to try to find it...
Reid Spencerb956fc12004-09-12 23:39:42 +0000109//
Teresa Johnsone5a61912015-12-17 17:14:09 +0000110static std::unique_ptr<Module> loadFile(const char *argv0,
111 const std::string &FN,
112 LLVMContext &Context,
113 bool MaterializeMetadata = true) {
Dan Gohman3d2c9142009-09-12 21:55:12 +0000114 SMDiagnostic Err;
Rafael Espindolaf1f12732013-06-17 17:32:19 +0000115 if (Verbose) errs() << "Loading '" << FN << "'\n";
Teresa Johnsone5a61912015-12-17 17:14:09 +0000116 std::unique_ptr<Module> Result =
117 getLazyIRFileModule(FN, Err, Context, !MaterializeMetadata);
Teresa Johnsonf4cc7522016-03-24 19:52:20 +0000118 if (!Result) {
Rafael Espindola5c4f4a62014-08-26 18:03:35 +0000119 Err.print(argv0, errs());
Teresa Johnsonf4cc7522016-03-24 19:52:20 +0000120 return nullptr;
121 }
Reid Spencerfe020a32004-09-11 04:32:42 +0000122
Teresa Johnsone5a61912015-12-17 17:14:09 +0000123 if (MaterializeMetadata) {
124 Result->materializeMetadata();
125 UpgradeDebugInfo(*Result);
126 }
Rafael Espindola2fcfb5e2015-03-27 15:55:06 +0000127
Rafael Espindola5c4f4a62014-08-26 18:03:35 +0000128 return Result;
Chris Lattnerae31f5b2001-10-24 06:23:00 +0000129}
Chris Lattner9d810e02001-10-13 07:06:23 +0000130
Teresa Johnsonf4cc7522016-03-24 19:52:20 +0000131namespace {
132
133/// Helper to load on demand a Module from file and cache it for subsequent
134/// queries during function importing.
135class ModuleLazyLoaderCache {
136 /// Cache of lazily loaded module for import.
137 StringMap<std::unique_ptr<Module>> ModuleMap;
138
139 /// Retrieve a Module from the cache or lazily load it on demand.
140 std::function<std::unique_ptr<Module>(const char *argv0,
141 const std::string &FileName)>
142 createLazyModule;
143
144public:
145 /// Create the loader, Module will be initialized in \p Context.
146 ModuleLazyLoaderCache(std::function<std::unique_ptr<Module>(
147 const char *argv0, const std::string &FileName)>
148 createLazyModule)
149 : createLazyModule(createLazyModule) {}
150
151 /// Retrieve a Module from the cache or lazily load it on demand.
152 Module &operator()(const char *argv0, const std::string &FileName);
153
154 std::unique_ptr<Module> takeModule(const std::string &FileName) {
155 auto I = ModuleMap.find(FileName);
156 assert(I != ModuleMap.end());
157 std::unique_ptr<Module> Ret = std::move(I->second);
158 ModuleMap.erase(I);
159 return Ret;
160 }
161};
162
163// Get a Module for \p FileName from the cache, or load it lazily.
164Module &ModuleLazyLoaderCache::operator()(const char *argv0,
165 const std::string &Identifier) {
166 auto &Module = ModuleMap[Identifier];
167 if (!Module)
168 Module = createLazyModule(argv0, Identifier);
169 return *Module;
170}
171} // anonymous namespace
172
Rafael Espindola4160f5d2014-10-27 23:02:10 +0000173static void diagnosticHandler(const DiagnosticInfo &DI) {
Rafael Espindolad12b4a32014-10-25 04:06:10 +0000174 unsigned Severity = DI.getSeverity();
175 switch (Severity) {
176 case DS_Error:
177 errs() << "ERROR: ";
Rafael Espindola4160f5d2014-10-27 23:02:10 +0000178 break;
Rafael Espindolad12b4a32014-10-25 04:06:10 +0000179 case DS_Warning:
180 if (SuppressWarnings)
181 return;
182 errs() << "WARNING: ";
183 break;
184 case DS_Remark:
185 case DS_Note:
186 llvm_unreachable("Only expecting warnings and errors");
187 }
188
189 DiagnosticPrinterRawOStream DP(errs());
190 DI.print(DP);
Rafael Espindola4160f5d2014-10-27 23:02:10 +0000191 errs() << '\n';
Rafael Espindolad12b4a32014-10-25 04:06:10 +0000192}
193
Rafael Espindola9d2bfc42015-12-14 23:17:03 +0000194static void diagnosticHandlerWithContext(const DiagnosticInfo &DI, void *C) {
195 diagnosticHandler(DI);
196}
197
Teresa Johnsonc7ed52f2015-11-03 00:14:15 +0000198/// Import any functions requested via the -import option.
199static bool importFunctions(const char *argv0, LLVMContext &Context,
200 Linker &L) {
Teresa Johnsonf4cc7522016-03-24 19:52:20 +0000201 if (SummaryIndex.empty())
202 return true;
203 ErrorOr<std::unique_ptr<ModuleSummaryIndex>> IndexOrErr =
204 llvm::getModuleSummaryIndexForFile(SummaryIndex, diagnosticHandler);
205 std::error_code EC = IndexOrErr.getError();
206 if (EC) {
207 errs() << EC.message() << '\n';
208 return false;
209 }
210 auto Index = std::move(IndexOrErr.get());
211
212 // Map of Module -> List of globals to import from the Module
213 std::map<StringRef, DenseSet<const GlobalValue *>> ModuleToGlobalsToImportMap;
214 auto ModuleLoader = [&Context](const char *argv0,
215 const std::string &Identifier) {
216 return loadFile(argv0, Identifier, Context, false);
217 };
218 ModuleLazyLoaderCache ModuleLoaderCache(ModuleLoader);
Teresa Johnsonc7ed52f2015-11-03 00:14:15 +0000219 for (const auto &Import : Imports) {
220 // Identify the requested function and its bitcode source file.
221 size_t Idx = Import.find(':');
222 if (Idx == std::string::npos) {
223 errs() << "Import parameter bad format: " << Import << "\n";
224 return false;
225 }
226 std::string FunctionName = Import.substr(0, Idx);
227 std::string FileName = Import.substr(Idx + 1, std::string::npos);
228
229 // Load the specified source module.
Teresa Johnsonf4cc7522016-03-24 19:52:20 +0000230 auto &SrcModule = ModuleLoaderCache(argv0, FileName);
Teresa Johnsonc7ed52f2015-11-03 00:14:15 +0000231
Teresa Johnsonf4cc7522016-03-24 19:52:20 +0000232 if (verifyModule(SrcModule, &errs())) {
Teresa Johnsonc7ed52f2015-11-03 00:14:15 +0000233 errs() << argv0 << ": " << FileName
234 << ": error: input module is broken!\n";
235 return false;
236 }
237
Teresa Johnsonf4cc7522016-03-24 19:52:20 +0000238 Function *F = SrcModule.getFunction(FunctionName);
Teresa Johnsonc7ed52f2015-11-03 00:14:15 +0000239 if (!F) {
240 errs() << "Ignoring import request for non-existent function "
241 << FunctionName << " from " << FileName << "\n";
242 continue;
243 }
244 // We cannot import weak_any functions without possibly affecting the
245 // order they are seen and selected by the linker, changing program
246 // semantics.
247 if (F->hasWeakAnyLinkage()) {
248 errs() << "Ignoring import request for weak-any function " << FunctionName
249 << " from " << FileName << "\n";
250 continue;
251 }
252
253 if (Verbose)
254 errs() << "Importing " << FunctionName << " from " << FileName << "\n";
255
Teresa Johnsonf4cc7522016-03-24 19:52:20 +0000256 auto &Entry = ModuleToGlobalsToImportMap[SrcModule.getModuleIdentifier()];
257 Entry.insert(F);
Mehdi Amini8d051852016-03-19 00:40:31 +0000258
Teresa Johnsonf4cc7522016-03-24 19:52:20 +0000259 F->materialize();
260 }
Mehdi Amini8d051852016-03-19 00:40:31 +0000261
Teresa Johnsonf4cc7522016-03-24 19:52:20 +0000262 // Do the actual import of globals now, one Module at a time
263 for (auto &GlobalsToImportPerModule : ModuleToGlobalsToImportMap) {
264 // Get the module for the import
265 auto &GlobalsToImport = GlobalsToImportPerModule.second;
266 std::unique_ptr<Module> SrcModule =
267 ModuleLoaderCache.takeModule(GlobalsToImportPerModule.first);
268 assert(&Context == &SrcModule->getContext() && "Context mismatch");
Teresa Johnsonc7ed52f2015-11-03 00:14:15 +0000269
Teresa Johnsonf4cc7522016-03-24 19:52:20 +0000270 // If modules were created with lazy metadata loading, materialize it
271 // now, before linking it (otherwise this will be a noop).
272 SrcModule->materializeMetadata();
273 UpgradeDebugInfo(*SrcModule);
Teresa Johnsone5a61912015-12-17 17:14:09 +0000274
Teresa Johnsonf4cc7522016-03-24 19:52:20 +0000275 // Linkage Promotion and renaming
276 if (renameModuleForThinLTO(*SrcModule, *Index, &GlobalsToImport))
277 return true;
278
Mehdi Aminibda3c972016-04-21 01:59:39 +0000279 // Instruct the linker to not automatically import linkonce defintion.
280 unsigned Flags = Linker::Flags::DontForceLinkLinkonceODR;
281
282 if (L.linkInModule(std::move(SrcModule), Flags, &GlobalsToImport))
Teresa Johnsone5a61912015-12-17 17:14:09 +0000283 return false;
284 }
285
Teresa Johnsonc7ed52f2015-11-03 00:14:15 +0000286 return true;
287}
288
Duncan P. N. Exon Smith0de129d2015-04-22 04:08:22 +0000289static bool linkFiles(const char *argv0, LLVMContext &Context, Linker &L,
Duncan P. N. Exon Smithe8681232015-04-22 04:11:00 +0000290 const cl::list<std::string> &Files,
Artem Belevich020d4fb2015-09-01 17:55:55 +0000291 unsigned Flags) {
292 // Filter out flags that don't apply to the first file we load.
293 unsigned ApplicableFlags = Flags & Linker::Flags::OverrideFromSrc;
Duncan P. N. Exon Smith0de129d2015-04-22 04:08:22 +0000294 for (const auto &File : Files) {
295 std::unique_ptr<Module> M = loadFile(argv0, File, Context);
296 if (!M.get()) {
297 errs() << argv0 << ": error loading file '" << File << "'\n";
298 return false;
299 }
300
301 if (verifyModule(*M, &errs())) {
302 errs() << argv0 << ": " << File << ": error: input module is broken!\n";
303 return false;
304 }
305
Teresa Johnson26ab5772016-03-15 00:04:37 +0000306 // If a module summary index is supplied, load it so linkInModule can treat
Teresa Johnsonc7ed52f2015-11-03 00:14:15 +0000307 // local functions/variables as exported and promote if necessary.
Teresa Johnson26ab5772016-03-15 00:04:37 +0000308 if (!SummaryIndex.empty()) {
309 ErrorOr<std::unique_ptr<ModuleSummaryIndex>> IndexOrErr =
310 llvm::getModuleSummaryIndexForFile(SummaryIndex, diagnosticHandler);
Teresa Johnsonc7ed52f2015-11-03 00:14:15 +0000311 std::error_code EC = IndexOrErr.getError();
312 if (EC) {
313 errs() << EC.message() << '\n';
314 return false;
315 }
Mehdi Amini8d051852016-03-19 00:40:31 +0000316 auto Index = std::move(IndexOrErr.get());
317
318 // Promotion
319 if (renameModuleForThinLTO(*M, *Index))
320 return true;
Teresa Johnsonc7ed52f2015-11-03 00:14:15 +0000321 }
322
Duncan P. N. Exon Smith0de129d2015-04-22 04:08:22 +0000323 if (Verbose)
324 errs() << "Linking in '" << File << "'\n";
325
Mehdi Amini8d051852016-03-19 00:40:31 +0000326 if (L.linkInModule(std::move(M), ApplicableFlags))
Duncan P. N. Exon Smith0de129d2015-04-22 04:08:22 +0000327 return false;
Artem Belevich020d4fb2015-09-01 17:55:55 +0000328 // All linker flags apply to linking of subsequent files.
329 ApplicableFlags = Flags;
Duncan P. N. Exon Smith0de129d2015-04-22 04:08:22 +0000330 }
331
332 return true;
333}
334
Chris Lattner9d810e02001-10-13 07:06:23 +0000335int main(int argc, char **argv) {
Chris Lattnere3fc2d12009-03-06 05:34:10 +0000336 // Print a stack trace if we signal out.
Chris Lattner27936992007-05-06 05:13:17 +0000337 sys::PrintStackTraceOnErrorSignal();
Chris Lattnere3fc2d12009-03-06 05:34:10 +0000338 PrettyStackTraceProgram X(argc, argv);
Andrew Trickdc073ad2013-09-18 23:31:10 +0000339
Mehdi Amini03b42e42016-04-14 21:59:01 +0000340 LLVMContext Context;
Rafael Espindola9d2bfc42015-12-14 23:17:03 +0000341 Context.setDiagnosticHandler(diagnosticHandlerWithContext, nullptr, true);
342
Chris Lattnere3fc2d12009-03-06 05:34:10 +0000343 llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.
344 cl::ParseCommandLineOptions(argc, argv, "llvm linker\n");
Chris Lattner9d810e02001-10-13 07:06:23 +0000345
Duncan P. N. Exon Smith5ab2be02016-04-17 03:58:21 +0000346 if (!DisableDITypeMap)
Duncan P. N. Exon Smithed8fdb22016-04-19 04:55:25 +0000347 Context.enableDebugTypeODRUniquing();
Duncan P. N. Exon Smith5ab2be02016-04-17 03:58:21 +0000348
Rafael Espindola957eae22014-10-23 19:40:45 +0000349 auto Composite = make_unique<Module>("llvm-link", Context);
Rafael Espindola9d2bfc42015-12-14 23:17:03 +0000350 Linker L(*Composite);
Rafael Espindola957eae22014-10-23 19:40:45 +0000351
Artem Belevich020d4fb2015-09-01 17:55:55 +0000352 unsigned Flags = Linker::Flags::None;
353 if (Internalize)
354 Flags |= Linker::Flags::InternalizeLinkedSymbols;
355 if (OnlyNeeded)
356 Flags |= Linker::Flags::LinkOnlyNeeded;
357
Duncan P. N. Exon Smithe8681232015-04-22 04:11:00 +0000358 // First add all the regular input files
Artem Belevich020d4fb2015-09-01 17:55:55 +0000359 if (!linkFiles(argv[0], Context, L, InputFilenames, Flags))
Duncan P. N. Exon Smithe8681232015-04-22 04:11:00 +0000360 return 1;
361
362 // Next the -override ones.
Artem Belevich020d4fb2015-09-01 17:55:55 +0000363 if (!linkFiles(argv[0], Context, L, OverridingInputs,
364 Flags | Linker::Flags::OverrideFromSrc))
Duncan P. N. Exon Smith0de129d2015-04-22 04:08:22 +0000365 return 1;
Reid Spencer996ec722004-12-30 05:36:08 +0000366
Teresa Johnsonc7ed52f2015-11-03 00:14:15 +0000367 // Import any functions requested via -import
368 if (!importFunctions(argv[0], Context, L))
369 return 1;
370
Dan Gohman2b09de92009-09-15 15:35:07 +0000371 if (DumpAsm) errs() << "Here's the assembly:\n" << *Composite;
Reid Spencer996ec722004-12-30 05:36:08 +0000372
Rafael Espindola3fd1e992014-08-25 18:16:47 +0000373 std::error_code EC;
374 tool_output_file Out(OutputFilename, EC, sys::fs::F_None);
375 if (EC) {
376 errs() << EC.message() << '\n';
Chris Lattnerabd17362009-08-23 02:56:05 +0000377 return 1;
378 }
Reid Spencer996ec722004-12-30 05:36:08 +0000379
Duncan P. N. Exon Smith46282822015-03-31 03:07:23 +0000380 if (verifyModule(*Composite, &errs())) {
381 errs() << argv[0] << ": error: linked module is broken!\n";
Chris Lattner27936992007-05-06 05:13:17 +0000382 return 1;
383 }
384
Dan Gohmanee051522009-07-16 15:30:09 +0000385 if (Verbose) errs() << "Writing bitcode...\n";
Dan Gohman2b09de92009-09-15 15:35:07 +0000386 if (OutputAssembly) {
Duncan P. N. Exon Smith8a7b84b2015-04-15 03:14:06 +0000387 Composite->print(Out.os(), nullptr, PreserveAssemblyUseListOrder);
Dan Gohmana2233f22010-09-01 14:20:41 +0000388 } else if (Force || !CheckBitcodeOutputToConsole(Out.os(), true))
Duncan P. N. Exon Smith8a7b84b2015-04-15 03:14:06 +0000389 WriteBitcodeToFile(Composite.get(), Out.os(), PreserveBitcodeUseListOrder);
Dan Gohman4cc73ba2010-08-20 01:12:13 +0000390
391 // Declare success.
392 Out.keep();
Chris Lattner27936992007-05-06 05:13:17 +0000393
Chris Lattner27936992007-05-06 05:13:17 +0000394 return 0;
Chris Lattner9d810e02001-10-13 07:06:23 +0000395}