aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/IR/Use.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/IR/Use.h')
-rw-r--r--include/llvm/IR/Use.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/include/llvm/IR/Use.h b/include/llvm/IR/Use.h
index 33a69c4..efd8b48 100644
--- a/include/llvm/IR/Use.h
+++ b/include/llvm/IR/Use.h
@@ -26,7 +26,9 @@
#define LLVM_IR_USE_H
#include "llvm/ADT/PointerIntPair.h"
+#include "llvm/Support/CBindingWrapping.h"
#include "llvm/Support/Compiler.h"
+#include "llvm-c/Core.h"
#include <cstddef>
#include <iterator>
@@ -149,14 +151,14 @@ private:
// casting operators.
template<> struct simplify_type<Use> {
typedef Value* SimpleType;
- static SimpleType getSimplifiedValue(const Use &Val) {
- return static_cast<SimpleType>(Val.get());
+ static SimpleType getSimplifiedValue(Use &Val) {
+ return Val.get();
}
};
template<> struct simplify_type<const Use> {
- typedef Value* SimpleType;
+ typedef /*const*/ Value* SimpleType;
static SimpleType getSimplifiedValue(const Use &Val) {
- return static_cast<SimpleType>(Val.get());
+ return Val.get();
}
};
@@ -214,6 +216,9 @@ public:
unsigned getOperandNo() const;
};
+// Create wrappers for C Binding types (see CBindingWrapping.h).
+DEFINE_SIMPLE_CONVERSION_FUNCTIONS(Use, LLVMUseRef)
+
} // End llvm namespace
#endif