[lld] r189023 - [lld][unittests] Change assert to llvm_unreachable

Shankar Easwaran shankare at codeaurora.org
Thu Aug 22 08:23:54 PDT 2013


Author: shankare
Date: Thu Aug 22 10:23:54 2013
New Revision: 189023

URL: http://llvm.org/viewvc/llvm-project?rev=189023&view=rev
Log:
[lld][unittests] Change assert to llvm_unreachable

Modified:
    lld/trunk/unittests/DriverTests/DriverTest.h

Modified: lld/trunk/unittests/DriverTests/DriverTest.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/unittests/DriverTests/DriverTest.h?rev=189023&r1=189022&r2=189023&view=diff
==============================================================================
--- lld/trunk/unittests/DriverTests/DriverTest.h (original)
+++ lld/trunk/unittests/DriverTests/DriverTest.h Thu Aug 22 10:23:54 2013
@@ -37,8 +37,7 @@ protected:
     const InputElement &inputElement = linkingContext()->inputGraph()[index];
     if (inputElement.kind() == InputElement::Kind::File)
       return (llvm::dyn_cast<FileNode>(&inputElement))->path(*linkingContext());
-    assert(0 && "not handling other types of input files");
-    return "";
+    llvm_unreachable("not handling other types of input files");
   }
 
   // For unit tests to call driver with various command lines.





More information about the llvm-commits mailing list