diff options
author | Kit Barton <kbarton@ca.ibm.com> | 2015-04-17 15:32:15 +0000 |
---|---|---|
committer | Kit Barton <kbarton@ca.ibm.com> | 2015-04-17 15:32:15 +0000 |
commit | 72918025332a942ddaf64c0afb2d5867b95197a4 (patch) | |
tree | 5adfed59d918a3db8d691f49d00733154d432156 /llvm/lib/IR/Core.cpp | |
parent | d854180afb5534537d854504498d96803dd914fe (diff) | |
download | bcm5719-llvm-72918025332a942ddaf64c0afb2d5867b95197a4.tar.gz bcm5719-llvm-72918025332a942ddaf64c0afb2d5867b95197a4.zip |
Add the i128 builtin type to LLVM.
The i128 type is needed as a builtin type in order to support the v1i128 vector
type. The PowerPC ABI requires that the i128 and v1i128 types are handled
differently when passed as parameters to functions (i128 is passed in pairs of
GPRs, v1i128 is passed in a single vector register).
http://reviews.llvm.org/D8564
llvm-svn: 235196
Diffstat (limited to 'llvm/lib/IR/Core.cpp')
-rw-r--r-- | llvm/lib/IR/Core.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/IR/Core.cpp b/llvm/lib/IR/Core.cpp index 7fe7beb40c6..0c1023c7348 100644 --- a/llvm/lib/IR/Core.cpp +++ b/llvm/lib/IR/Core.cpp @@ -310,6 +310,9 @@ LLVMTypeRef LLVMInt32TypeInContext(LLVMContextRef C) { LLVMTypeRef LLVMInt64TypeInContext(LLVMContextRef C) { return (LLVMTypeRef) Type::getInt64Ty(*unwrap(C)); } +LLVMTypeRef LLVMInt128TypeInContext(LLVMContextRef C) { + return (LLVMTypeRef) Type::getInt128Ty(*unwrap(C)); +} LLVMTypeRef LLVMIntTypeInContext(LLVMContextRef C, unsigned NumBits) { return wrap(IntegerType::get(*unwrap(C), NumBits)); } @@ -329,6 +332,9 @@ LLVMTypeRef LLVMInt32Type(void) { LLVMTypeRef LLVMInt64Type(void) { return LLVMInt64TypeInContext(LLVMGetGlobalContext()); } +LLVMTypeRef LLVMInt128Type(void) { + return LLVMInt128TypeInContext(LLVMGetGlobalContext()); +} LLVMTypeRef LLVMIntType(unsigned NumBits) { return LLVMIntTypeInContext(LLVMGetGlobalContext(), NumBits); } |