[AddressSanitizer] assert(false) -> llvm_unreachable and remove return.
authorDavide Italiano <davide@freebsd.org>
Thu, 19 Nov 2015 19:28:23 +0000 (19:28 +0000)
committerDavide Italiano <davide@freebsd.org>
Thu, 19 Nov 2015 19:28:23 +0000 (19:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253591 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Instrumentation/AddressSanitizer.cpp

index 0ad3c2889a0170a0b6a5769ec2fd90ec3a43a48d..9048384164e5e2671c7568b7246b3ce7de6536e8 100644 (file)
@@ -1216,10 +1216,8 @@ bool AddressSanitizerModule::ShouldInstrumentGlobal(GlobalVariable *G) {
       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