[lld] r194890 - Use llvm_unreachable() instead of assert() at where control should never get.

Rui Ueyama ruiu at google.com
Fri Nov 15 15:36:48 PST 2013


Author: ruiu
Date: Fri Nov 15 17:36:48 2013
New Revision: 194890

URL: http://llvm.org/viewvc/llvm-project?rev=194890&view=rev
Log:
Use llvm_unreachable() instead of assert() at where control should never get.

Modified:
    lld/trunk/lib/ReaderWriter/Native/WriterNative.cpp

Modified: lld/trunk/lib/ReaderWriter/Native/WriterNative.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/Native/WriterNative.cpp?rev=194890&r1=194889&r2=194890&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/Native/WriterNative.cpp (original)
+++ lld/trunk/lib/ReaderWriter/Native/WriterNative.cpp Fri Nov 15 17:36:48 2013
@@ -273,8 +273,7 @@ private:
       if ( chunks[i].signature == signature )
         return chunks[i];
     }
-    assert(0 && "findChunk() signature not found");
-    static NativeChunk x; return x; // suppress warning
+    llvm_unreachable("findChunk() signature not found");
   }
 
   // append atom name to string pool and return offset





More information about the llvm-commits mailing list