We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d733d95 commit d7a7d01Copy full SHA for d7a7d01
compiler/rustc_codegen_llvm/src/llvm/mod.rs
@@ -414,3 +414,15 @@ pub(crate) fn set_dso_local<'ll>(v: &'ll Value) {
414
LLVMRustSetDSOLocal(v, true);
415
}
416
417
+
418
+pub(crate) fn get_functions(module: &Module) -> Vec<&Value> {
419
+ let mut functions = Vec::new();
420
+ let mut func = unsafe { LLVMGetFirstFunction(module) };
421
422
+ while let Some(f) = func {
423
+ functions.push(f);
424
+ func = unsafe { LLVMGetNextFunction(f) };
425
+ }
426
427
+ functions
428
+}
0 commit comments