[llvm-commits] [llvm-gcc-4.2] r48547 - /llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp

Bill Wendling isanbard at gmail.com
Wed Mar 19 11:40:13 PDT 2008


Author: void
Date: Wed Mar 19 13:40:13 2008
New Revision: 48547

URL: http://llvm.org/viewvc/llvm-project?rev=48547&view=rev
Log:
The "asm_out.visibility" function emits important warnings in certain
cases. Call this function so that we can get these.

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

Modified: llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp?rev=48547&r1=48546&r2=48547&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Wed Mar 19 13:40:13 2008
@@ -61,6 +61,7 @@
 #include "tree.h"
 #include "diagnostic.h"
 #include "output.h"
+#include "target.h"
 #include "toplev.h"
 #include "timevar.h"
 #include "tm.h"
@@ -630,6 +631,12 @@
   Function *Fn;
   {
     TreeToLLVM Emitter(fndecl);
+    enum symbol_visibility vis = DECL_VISIBILITY (fndecl);
+
+    if (vis != VISIBILITY_DEFAULT)
+      // "asm_out.visibility" emits an important warning if we're using a
+      // visibility that's not supported by the target.
+      targetm.asm_out.visibility(fndecl, vis);
 
     Fn = Emitter.EmitFunction();
   }





More information about the llvm-commits mailing list