mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
Use templated version of unwrap instead of cats in the Core.cpp. NFC
llvm-svn: 263349
This commit is contained in:
parent
577518b8ab
commit
483902dcce
@ -1569,7 +1569,7 @@ LLVMValueRef LLVMConstNamedStruct(LLVMTypeRef StructTy,
|
||||
*
|
||||
* @see ConstantDataSequential::getElementAsConstant()
|
||||
*/
|
||||
LLVMValueRef LLVMGetElementAsConstant(LLVMValueRef c, unsigned idx);
|
||||
LLVMValueRef LLVMGetElementAsConstant(LLVMValueRef C, unsigned idx);
|
||||
|
||||
/**
|
||||
* Create a ConstantVector from values.
|
||||
|
@ -613,7 +613,6 @@ public:
|
||||
/// The size of the elements is known to be a multiple of one byte.
|
||||
uint64_t getElementByteSize() const;
|
||||
|
||||
|
||||
/// This method returns true if this is an array of i8.
|
||||
bool isString() const;
|
||||
|
||||
|
@ -910,22 +910,23 @@ LLVMValueRef LLVMConstStringInContext(LLVMContextRef C, const char *Str,
|
||||
return wrap(ConstantDataArray::getString(*unwrap(C), StringRef(Str, Length),
|
||||
DontNullTerminate == 0));
|
||||
}
|
||||
|
||||
LLVMValueRef LLVMConstString(const char *Str, unsigned Length,
|
||||
LLVMBool DontNullTerminate) {
|
||||
return LLVMConstStringInContext(LLVMGetGlobalContext(), Str, Length,
|
||||
DontNullTerminate);
|
||||
}
|
||||
|
||||
LLVMValueRef LLVMGetElementAsConstant(LLVMValueRef c, unsigned idx) {
|
||||
return wrap(static_cast<ConstantDataSequential*>(unwrap(c))->getElementAsConstant(idx));
|
||||
LLVMValueRef LLVMGetElementAsConstant(LLVMValueRef C, unsigned idx) {
|
||||
return wrap(unwrap<ConstantDataSequential>(C)->getElementAsConstant(idx));
|
||||
}
|
||||
|
||||
LLVMBool LLVMIsConstantString(LLVMValueRef c) {
|
||||
return static_cast<ConstantDataSequential*>(unwrap(c))->isString();
|
||||
LLVMBool LLVMIsConstantString(LLVMValueRef C) {
|
||||
return unwrap<ConstantDataSequential>(C)->isString();
|
||||
}
|
||||
|
||||
const char *LLVMGetAsString(LLVMValueRef c, size_t* Length) {
|
||||
StringRef str = static_cast<ConstantDataSequential*>(unwrap(c))->getAsString();
|
||||
const char *LLVMGetAsString(LLVMValueRef C, size_t* Length) {
|
||||
StringRef str = unwrap<ConstantDataSequential>(C)->getAsString();
|
||||
*Length = str.size();
|
||||
return str.data();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user