Follow up to r253591. Turn into an assertion.
authorDavide Italiano <davide@freebsd.org>
Thu, 19 Nov 2015 21:50:08 +0000 (21:50 +0000)
committerDavide Italiano <davide@freebsd.org>
Thu, 19 Nov 2015 21:50:08 +0000 (21:50 +0000)
Reported by: David Blaikie.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253605 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Instrumentation/AddressSanitizer.cpp

index 9048384164e5e2671c7568b7246b3ce7de6536e8..8eb82e39b8a689d9906b2a97415fd1b6d389d9cf 100644 (file)
@@ -1216,8 +1216,7 @@ bool AddressSanitizerModule::ShouldInstrumentGlobal(GlobalVariable *G) {
       bool TAAParsed;
       std::string ErrorCode = MCSectionMachO::ParseSectionSpecifier(
           Section, ParsedSegment, ParsedSection, TAA, TAAParsed, StubSize);
       bool TAAParsed;
       std::string ErrorCode = MCSectionMachO::ParseSectionSpecifier(
           Section, ParsedSegment, ParsedSection, TAA, TAAParsed, StubSize);
-      if (!ErrorCode.empty())
-        llvm_unreachable("Invalid section specifier.");
+      assert(ErrorCode.empty() && "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
 
       // 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