[llvm] r253591 - [AddressSanitizer] assert(false) -> llvm_unreachable and remove return.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 19 11:28:23 PST 2015


Author: davide
Date: Thu Nov 19 13:28:23 2015
New Revision: 253591

URL: http://llvm.org/viewvc/llvm-project?rev=253591&view=rev
Log:
[AddressSanitizer] assert(false) -> llvm_unreachable and remove return.

Modified:
    llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp

Modified: llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp?rev=253591&r1=253590&r2=253591&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp Thu Nov 19 13:28:23 2015
@@ -1216,10 +1216,8 @@ bool AddressSanitizerModule::ShouldInstr
       bool TAAParsed;
       std::string ErrorCode = MCSectionMachO::ParseSectionSpecifier(
           Section, ParsedSegment, ParsedSection, TAA, TAAParsed, StubSize);
-      if (!ErrorCode.empty()) {
-        assert(false && "Invalid section specifier.");
-        return false;
-      }
+      if (!ErrorCode.empty())
+        llvm_unreachable("Invalid section specifier.");
 
       // Ignore the globals from the __OBJC section. The ObjC runtime assumes
       // those conform to /usr/lib/objc/runtime.h, so we can't add redzones to




More information about the llvm-commits mailing list