[llvm-commits] [gcc-plugin] r79920 - /gcc-plugin/trunk/llvm-backend.cpp

Duncan Sands baldrick at free.fr
Mon Aug 24 08:27:00 PDT 2009


Author: baldrick
Date: Mon Aug 24 10:27:00 2009
New Revision: 79920

URL: http://llvm.org/viewvc/llvm-project?rev=79920&view=rev
Log:
If the plugin is not compatible with the gcc it
is being loaded into, exit without calling any
further gcc routines.

Modified:
    gcc-plugin/trunk/llvm-backend.cpp

Modified: gcc-plugin/trunk/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-backend.cpp?rev=79920&r1=79919&r2=79920&view=diff

==============================================================================
--- gcc-plugin/trunk/llvm-backend.cpp (original)
+++ gcc-plugin/trunk/llvm-backend.cpp Mon Aug 24 10:27:00 2009
@@ -2008,14 +2008,9 @@
 
   // Check that the running gcc is the same as the gcc we were built against.
   // If not, refuse to load.  This seems wise when developing against a fast
-  // moving gcc tree.
-  // TODO: Make the check milder if doing a "release build".
+  // moving gcc tree.  TODO: Use a milder check if doing a "release build".
   if (!plugin_default_version_check (version, &gcc_version)) {
-    // TODO: calling a gcc routine when there is a version mismatch is
-    // dangerous.  On the other hand, failing without an explanation is
-    // obscure.  Could send a message to std::cerr instead, but bypassing
-    // the gcc error reporting and translating mechanism is kind of sucky.
-    error(G_("plugin %qs: gcc version mismatch"), plugin_name);
+    errs() << "Incompatible plugin version\n";
     return 1;
   }
 





More information about the llvm-commits mailing list