Never inline naked functions
The `#[naked]` attribute disabled prologue / epilogue emission for the function and it is responsibility of a developer to provide them. The compiler is no position to inline such functions correctly. Disable inlining of naked functions at LLVM and MIR level.
This commit is contained in:
parent
fe982319aa
commit
c2fb99984c
4 changed files with 45 additions and 4 deletions
|
@ -67,7 +67,7 @@ fn handle_errors(sess: &ParseSess, span: Span, error: AttrError) {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, PartialEq, Encodable, Decodable)]
|
||||
#[derive(Copy, Clone, PartialEq, Encodable, Decodable)]
|
||||
pub enum InlineAttr {
|
||||
None,
|
||||
Hint,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue