diff options
| author | bit-aloo <sshourya17@gmail.com> | 2025-04-20 15:54:12 +0530 |
|---|---|---|
| committer | bit-aloo <sshourya17@gmail.com> | 2025-04-28 21:10:32 +0530 |
| commit | 7018392337a938e25c9ed9190c4f0966737fffdb (patch) | |
| tree | 94fbc240f3d868fe229a4848381f76a8e52d80f5 /compiler/rustc_codegen_llvm/src/context.rs | |
| parent | 9bc04016e6dffd6398ea62f05b9320e0198ab0be (diff) | |
| download | rust-7018392337a938e25c9ed9190c4f0966737fffdb.tar.gz rust-7018392337a938e25c9ed9190c4f0966737fffdb.zip | |
remove noinline attribute and add alwaysinline after AD pass
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/context.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/context.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/context.rs b/compiler/rustc_codegen_llvm/src/context.rs index 4ec69995518..ed50515b707 100644 --- a/compiler/rustc_codegen_llvm/src/context.rs +++ b/compiler/rustc_codegen_llvm/src/context.rs @@ -698,6 +698,16 @@ impl<'ll, CX: Borrow<SCx<'ll>>> GenericCx<'ll, CX> { llvm::LLVMMDStringInContext2(self.llcx(), name.as_ptr() as *const c_char, name.len()) }) } + + pub(crate) fn get_functions(&self) -> Vec<&'ll Value> { + let mut functions = vec![]; + let mut func = unsafe { llvm::LLVMGetFirstFunction(self.llmod()) }; + while let Some(f) = func { + functions.push(f); + func = unsafe { llvm::LLVMGetNextFunction(f) } + } + functions + } } impl<'ll, 'tcx> MiscCodegenMethods<'tcx> for CodegenCx<'ll, 'tcx> { |
