Add printVersion(). Linker can use it to print LLVM version number.
authorDevang Patel <dpatel@apple.com>
Thu, 1 Feb 2007 01:46:06 +0000 (01:46 +0000)
committerDevang Patel <dpatel@apple.com>
Thu, 1 Feb 2007 01:46:06 +0000 (01:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33738 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/LinkTimeOptimizer.h
tools/lto/lto.cpp

index 50c1613eb004547935d40dc2a528990ce77e2cde..164232d20989b0559e5482a9f8a9178bdd527e1e 100644 (file)
@@ -96,6 +96,7 @@ namespace llvm {
                                            const char *) = 0;
     virtual void getTargetTriple(const std::string &, std::string &) = 0;
     virtual void removeModule (const std::string &InputFilename) = 0;
+    virtual void printVersion () = 0;
     virtual ~LinkTimeOptimizer() = 0;
   };
 
@@ -119,6 +120,7 @@ namespace llvm {
     void getTargetTriple(const std::string &InputFilename, 
                          std::string &targetTriple);
     void removeModule (const std::string &InputFilename);
+    void printVersion();
 
     // Constructors and destructors
     LTO() { 
index d280f23940eb440726abab8166ba78f52b3b6060..f3688b4702748d69d65b4e2b462a609815369873 100644 (file)
@@ -457,6 +457,10 @@ LTO::optimizeModules(const std::string &OutputFilename,
   return LTO_OPT_SUCCESS;
 }
 
+void LTO::printVersion() {
+    cl::PrintVersionMessage();
+}
+
 /// Unused pure-virtual destructor. Must remain empty.
 LinkTimeOptimizer::~LinkTimeOptimizer() {}