Make it possible to use the linker without destroying the source module. This is...
[oota-llvm.git] / tools / llvm-link / llvm-link.cpp
index 3fb7ba42cd05727e12e08222954b11bca1806596..95ad1ca5a17ee85cd4665af191f5df10044bff77 100644 (file)
@@ -103,7 +103,8 @@ int main(int argc, char **argv) {
 
     if (Verbose) errs() << "Linking in '" << InputFilenames[i] << "'\n";
 
-    if (Linker::LinkModules(Composite.get(), M.get(), &ErrorMessage)) {
+    if (Linker::LinkModules(Composite.get(), M.get(), Linker::DestroySource,
+                            &ErrorMessage)) {
       errs() << argv[0] << ": link error in '" << InputFilenames[i]
              << "': " << ErrorMessage << "\n";
       return 1;