https://bugs.llvm.org/show_bug.cgi?id=42783

            Bug ID: 42783
           Summary: Add a way to avoid calls to noreturn functions from
                    being merged
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C
          Assignee: unassignedclangb...@nondot.org
          Reporter: jmuizel...@mozilla.com
                CC: blitzrak...@gmail.com, dgre...@apple.com,
                    erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
                    richard-l...@metafoo.co.uk

Given the following code it would be nice if there was a way to ensure that
each of the callsites to crash() remained unique so that it's possible to
distinguish which callsite is triggering a particular crash().

void crash() __attribute__((noreturn));


void f(int i) {
    if (i == 5) {
        crash();
    }
    else if (i == 7) {
        crash();
    }
    crash();
}

Today this just gets compiled to:

f(int):                                  # @f(int)
        pushq   %rax
        callq   crash()

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to