about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorRich Kadel <richkadel@google.com>2020-06-19 09:50:00 -0700
committerGitHub <noreply@github.com>2020-06-19 09:50:00 -0700
commit791ccccddc18e83faa9963824112b14b3b1a93c2 (patch)
tree227579b6a22580e046493bb93b2adb946f9db021 /src/rustllvm/RustWrapper.cpp
parent7ef9eb321a0e3acf350af3866041ba75251d2884 (diff)
parent72417d84fb51495a4f1d007fb2397a0b2609ab63 (diff)
downloadrust-791ccccddc18e83faa9963824112b14b3b1a93c2.tar.gz
rust-791ccccddc18e83faa9963824112b14b3b1a93c2.zip
Merge pull request #5 from rust-lang/master
update from origin 2020-06-19
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
-rw-r--r--src/rustllvm/RustWrapper.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp
index 4704622922a..cdb3a157eab 100644
--- a/src/rustllvm/RustWrapper.cpp
+++ b/src/rustllvm/RustWrapper.cpp
@@ -5,6 +5,7 @@
 #include "llvm/IR/DiagnosticPrinter.h"
 #include "llvm/IR/GlobalVariable.h"
 #include "llvm/IR/Instructions.h"
+#include "llvm/IR/Intrinsics.h"
 #include "llvm/Object/Archive.h"
 #include "llvm/Object/ObjectFile.h"
 #include "llvm/Bitcode/BitcodeWriterPass.h"
@@ -1364,6 +1365,11 @@ extern "C" LLVMValueRef LLVMRustBuildCall(LLVMBuilderRef B, LLVMValueRef Fn,
       unwrap(Fn), makeArrayRef(unwrap(Args), NumArgs), Bundles));
 }
 
+extern "C" LLVMValueRef LLVMRustGetInstrprofIncrementIntrinsic(LLVMModuleRef M) {
+  return wrap(llvm::Intrinsic::getDeclaration(unwrap(M),
+              (llvm::Intrinsic::ID)llvm::Intrinsic::instrprof_increment));
+}
+
 extern "C" LLVMValueRef LLVMRustBuildMemCpy(LLVMBuilderRef B,
                                             LLVMValueRef Dst, unsigned DstAlign,
                                             LLVMValueRef Src, unsigned SrcAlign,