[llvm] r253591 - [AddressSanitizer] assert(false) -> llvm_unreachable and remove return.
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 19 11:43:03 PST 2015
On Thu, Nov 19, 2015 at 11:28 AM, Davide Italiano via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> 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.");
>
This looks like it should just be an assertion:
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
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151119/ab19e2d9/attachment.html>
More information about the llvm-commits
mailing list