about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorErik Desjardins <erikdesjardins@users.noreply.github.com>2021-12-29 23:19:55 -0500
committerErik Desjardins <erikdesjardins@users.noreply.github.com>2021-12-30 00:15:51 -0500
commite4463b2453f3b2665076e5daec23040976b8792e (patch)
tree91d81db07258a14eb542f635705737c4f268dd2a /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent2b662217e745d88d93dcc6f5f5169bf7a0d9720e (diff)
downloadrust-e4463b2453f3b2665076e5daec23040976b8792e.tar.gz
rust-e4463b2453f3b2665076e5daec23040976b8792e.zip
keep noinline for system llvm < 14
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
index 3fbf020c552..025a0ee376e 100644
--- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
+++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
@@ -716,6 +716,14 @@ extern "C" uint32_t LLVMRustVersionMinor() { return LLVM_VERSION_MINOR; }
 
 extern "C" uint32_t LLVMRustVersionMajor() { return LLVM_VERSION_MAJOR; }
 
+extern "C" bool LLVMRustIsRustLLVM() {
+#ifdef LLVM_RUSTLLVM
+  return true;
+#else
+  return false;
+#endif
+}
+
 extern "C" void LLVMRustAddModuleFlag(LLVMModuleRef M, const char *Name,
                                       uint32_t Value) {
   unwrap(M)->addModuleFlag(Module::Warning, Name, Value);