Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't crash when generating code for __attribute__((naked)) member fu…
…nctions. Summary: Previously this crashed inside EmitThisParam(). There should be no prelude for naked functions, so just skip the whole thing. Reviewers: majnemer Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D22715 llvm-svn: 276925
- Loading branch information
Justin Lebar
committed
Jul 27, 2016
1 parent
fc07e8b
commit ed4f172
Showing
3 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s | ||
// RUN: %clang_cc1 -triple x86_64-windows -emit-llvm %s -o - | FileCheck %s | ||
|
||
class TestNaked { | ||
public: | ||
void NakedFunction(); | ||
}; | ||
|
||
__attribute__((naked)) void TestNaked::NakedFunction() { | ||
// CHECK-LABEL: define void @ | ||
// CHECK: call void asm sideeffect | ||
asm(""); | ||
} |