[llvm-commits] CVS: llvm/lib/Bytecode/Writer/Writer.cpp

Anton Korobeynikov asl at math.spbu.ru
Sun Apr 29 11:35:43 PDT 2007



Changes in directory llvm/lib/Bytecode/Writer:

Writer.cpp updated: 1.178 -> 1.179
---
Log message:

Implement protected visibility. This partly implements PR1363: http://llvm.org/PR1363 . Linker 
should be taught to deal with protected symbols.


---
Diffs of the changes:  (+3 -2)

 Writer.cpp |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)


Index: llvm/lib/Bytecode/Writer/Writer.cpp
diff -u llvm/lib/Bytecode/Writer/Writer.cpp:1.178 llvm/lib/Bytecode/Writer/Writer.cpp:1.179
--- llvm/lib/Bytecode/Writer/Writer.cpp:1.178	Sat Apr 28 08:44:59 2007
+++ llvm/lib/Bytecode/Writer/Writer.cpp	Sun Apr 29 13:35:00 2007
@@ -957,8 +957,9 @@
 static unsigned getEncodedVisibility(const GlobalValue *GV) {
   switch (GV->getVisibility()) {
   default: assert(0 && "Invalid visibility!");
-  case GlobalValue::DefaultVisibility: return 0;
-  case GlobalValue::HiddenVisibility:  return 1;
+  case GlobalValue::DefaultVisibility:   return 0;
+  case GlobalValue::HiddenVisibility:    return 1;
+  case GlobalValue::ProtectedVisibility: return 2;
   }
 }
 






More information about the llvm-commits mailing list