-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bump minimum LLVM version to 5.0 #51899
Changes from 1 commit
4ff90c7
52d7740
23dfb42
fe75f61
3b36ce6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ use builder::Builder; | |
use common::{CodegenCx, Funclet}; | ||
use debuginfo::{self, declare_local, VariableAccess, VariableKind, FunctionDebugContext}; | ||
use monomorphize::Instance; | ||
use abi::{ArgAttribute, ArgTypeExt, FnType, FnTypeExt, PassMode}; | ||
use abi::{ArgTypeExt, FnType, FnTypeExt, PassMode}; | ||
use type_::Type; | ||
|
||
use syntax_pos::{DUMMY_SP, NO_EXPANSION, BytePos, Span}; | ||
|
@@ -430,10 +430,6 @@ fn arg_local_refs<'a, 'tcx>(bx: &Builder<'a, 'tcx>, | |
None | ||
}; | ||
|
||
let deref_op = unsafe { | ||
[llvm::LLVMRustDIBuilderCreateOpDeref()] | ||
}; | ||
|
||
mir.args_iter().enumerate().map(|(arg_index, local)| { | ||
let arg_decl = &mir.local_decls[local]; | ||
|
||
|
@@ -543,21 +539,11 @@ fn arg_local_refs<'a, 'tcx>(bx: &Builder<'a, 'tcx>, | |
if arg_index > 0 || mir.upvar_decls.is_empty() { | ||
// The Rust ABI passes indirect variables using a pointer and a manual copy, so we | ||
// need to insert a deref here, but the C ABI uses a pointer and a copy using the | ||
// byval attribute, for which LLVM does the deref itself, so we must not add it. | ||
// Starting with D31439 in LLVM 5, it *always* does the deref itself. | ||
let mut variable_access = VariableAccess::DirectVariable { | ||
// byval attribute, for which LLVM always does the deref itself, | ||
// so we must not add it. | ||
let variable_access = VariableAccess::DirectVariable { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So, this sort of change is why I pointed out that llvm-emscripten is still on LLVM 4. Won't it be broken by this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If Emscripten had working debuginfo it might be broken yeah but I don't think it has debuginfo to nearly this level of fidelity for it to matter too much |
||
alloca: place.llval | ||
}; | ||
if unsafe { llvm::LLVMRustVersionMajor() < 5 } { | ||
if let PassMode::Indirect(ref attrs) = arg.mode { | ||
if !attrs.contains(ArgAttribute::ByVal) { | ||
variable_access = VariableAccess::IndirectVariable { | ||
alloca: place.llval, | ||
address_operations: &deref_op, | ||
}; | ||
} | ||
} | ||
} | ||
|
||
declare_local( | ||
bx, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @nox