Skip to content
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

Add noalias and noreturn attributes in more cases. #11538

Merged
merged 1 commit into from
Jan 14, 2014

Conversation

eddyb
Copy link
Member

@eddyb eddyb commented Jan 14, 2014

No description provided.

@eddyb
Copy link
Member Author

eddyb commented Jan 14, 2014

Notably, abort in libstd wasn't getting the noreturn attribute:

fn main() {let x = ~3; assert_eq!(*x, 3);}
; before
define internal void @main::h56d0d172826fda0bah::v0.0({ i64, %tydesc*, i8*, i8*, i8 }* nocapture readnone) unnamed_addr #2 {
"function top level":
  %__self.i = alloca { %"enum.std::fmt::rt::Piece[#1]"*, i64 }, align 8
  %__self2.i = alloca { %"struct.std::fmt::Argument[#1]"*, i64 }, align 8
  %1 = alloca %str_slice, align 8
  %2 = call %"enum.std::libc::types::common::c95::c_void[#1]"* @malloc(i64 8)
  %3 = icmp eq %"enum.std::libc::types::common::c95::c_void[#1]"* %2, null
  br i1 %3, label %next.thread, label %cond.i.i

next.thread:                                      ; preds = %"function top level"
  call void @abort()
  %4 = bitcast %"enum.std::libc::types::common::c95::c_void[#1]"* %2 to i64*
  store i64 3, i64* %4, align 8
  br label %"_ZN8_$UP$u329glue_drop19hb6a3c7b062d25f8faFE.exit"

cond.i.i:                                         ; preds = %"function top level"
  %5 = bitcast %"enum.std::libc::types::common::c95::c_void[#1]"* %2 to i64*
  store i64 3, i64* %5, align 8
  call void @free(%"enum.std::libc::types::common::c95::c_void[#1]"* %2) #0
  br label %"_ZN8_$UP$u329glue_drop19hb6a3c7b062d25f8faFE.exit"

"_ZN8_$UP$u329glue_drop19hb6a3c7b062d25f8faFE.exit": ; preds = %next.thread, %cond.i.i
  ret void
}
;after
define internal void @main::h56d0d172826fda0bah::v0.0({ i64, %tydesc*, i8*, i8*, i8 }* nocapture readnone) unnamed_addr #2 {
"function top level":
  %__self.i = alloca { %"enum.std::fmt::rt::Piece[#1]"*, i64 }, align 8
  %__self2.i = alloca { %"struct.std::fmt::Argument[#1]"*, i64 }, align 8
  %1 = alloca %str_slice, align 8
  %2 = call %"enum.std::libc::types::common::c95::c_void[#1]"* @malloc(i64 8)
  %3 = icmp eq %"enum.std::libc::types::common::c95::c_void[#1]"* %2, null
  br i1 %3, label %then.i, label %"_ZN13_$UP$$LP$$RP$9glue_drop19hbc5ddb2494333fa7asE.exit"

then.i:                                           ; preds = %"function top level"
  call void @abort()
  unreachable

"_ZN13_$UP$$LP$$RP$9glue_drop19hbc5ddb2494333fa7asE.exit": ; preds = %"function top level"
  %4 = bitcast %"enum.std::libc::types::common::c95::c_void[#1]"* %2 to i64*
  store i64 3, i64* %4, align 8
  call void @free(%"enum.std::libc::types::common::c95::c_void[#1]"* %2) #0
  ret void
}

@bors bors closed this Jan 14, 2014
@bors bors merged commit 8e2027a into rust-lang:master Jan 14, 2014
@eddyb eddyb deleted the llvm-attributes branch January 15, 2014 05:31
flip1995 pushed a commit to flip1995/rust that referenced this pull request Dec 16, 2023
Fix `is_from_proc_macro` patterns

fixes rust-lang#11533

changelog: none
flip1995 pushed a commit to flip1995/rust that referenced this pull request Dec 21, 2023
Fix `is_from_proc_macro` patterns

fixes rust-lang#11533

changelog: none
flip1995 pushed a commit to flip1995/rust that referenced this pull request Dec 21, 2023
Fix `is_from_proc_macro` patterns

fixes rust-lang#11533

changelog: none
xobs pushed a commit to betrusted-io/rust that referenced this pull request Dec 24, 2023
Fix `is_from_proc_macro` patterns

fixes rust-lang#11533

changelog: none
LucasSte pushed a commit to LucasSte/rust that referenced this pull request Feb 19, 2024
Fix `is_from_proc_macro` patterns

fixes rust-lang#11533

changelog: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants