[lld] r234548 - Remove dead code.

Rui Ueyama ruiu at google.com
Thu Apr 9 17:04:44 PDT 2015


Author: ruiu
Date: Thu Apr  9 19:04:44 2015
New Revision: 234548

URL: http://llvm.org/viewvc/llvm-project?rev=234548&view=rev
Log:
Remove dead code.

Modified:
    lld/trunk/include/lld/ReaderWriter/RelocationHelperFunctions.h

Modified: lld/trunk/include/lld/ReaderWriter/RelocationHelperFunctions.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/ReaderWriter/RelocationHelperFunctions.h?rev=234548&r1=234547&r2=234548&view=diff
==============================================================================
--- lld/trunk/include/lld/ReaderWriter/RelocationHelperFunctions.h (original)
+++ lld/trunk/include/lld/ReaderWriter/RelocationHelperFunctions.h Thu Apr  9 19:04:44 2015
@@ -12,26 +12,6 @@
 
 namespace lld {
 
-/// Gather val's bits as specified by the mask. Example:
-///
-///  Val:    0bABCDEFGHIJKLMN
-///  Mask:   0b10111100001011
-///  Output: 0b000000ACDEFKMN
-template <typename T> T gatherBits(T val, T mask) {
-  T result = 0;
-  size_t off = 0;
-
-  for (size_t bit = 0; bit < sizeof(T) * 8; ++bit) {
-    bool maskBit = (mask >> bit) & 1;
-    if (maskBit) {
-      bool valBit = (val >> bit) & 1;
-      result |= static_cast<T>(valBit) << off;
-      ++off;
-    }
-  }
-  return result;
-}
-
 /// Scatter val's bits as specified by the mask. Example:
 ///
 ///  Val:    0bABCDEFG





More information about the llvm-commits mailing list