mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 12:29:58 +00:00
Style fix in Core.h / Core.cpp. NFC
llvm-svn: 267257
This commit is contained in:
parent
2b39bb5c9b
commit
db5c1c4b5a
@ -636,7 +636,7 @@ LLVMTypeRef LLVMGetTypeByName(LLVMModuleRef M, const char *Name);
|
||||
*
|
||||
* @see llvm::Module::getNamedMetadata()
|
||||
*/
|
||||
unsigned LLVMGetNamedMetadataNumOperands(LLVMModuleRef M, const char* name);
|
||||
unsigned LLVMGetNamedMetadataNumOperands(LLVMModuleRef M, const char *Name);
|
||||
|
||||
/**
|
||||
* Obtain the named metadata operands for a module.
|
||||
@ -649,7 +649,8 @@ unsigned LLVMGetNamedMetadataNumOperands(LLVMModuleRef M, const char* name);
|
||||
* @see llvm::Module::getNamedMetadata()
|
||||
* @see llvm::MDNode::getOperand()
|
||||
*/
|
||||
void LLVMGetNamedMetadataOperands(LLVMModuleRef M, const char* name, LLVMValueRef *Dest);
|
||||
void LLVMGetNamedMetadataOperands(LLVMModuleRef M, const char *Name,
|
||||
LLVMValueRef *Dest);
|
||||
|
||||
/**
|
||||
* Add an operand to named metadata.
|
||||
@ -657,7 +658,7 @@ void LLVMGetNamedMetadataOperands(LLVMModuleRef M, const char* name, LLVMValueRe
|
||||
* @see llvm::Module::getNamedMetadata()
|
||||
* @see llvm::MDNode::addOperand()
|
||||
*/
|
||||
void LLVMAddNamedMetadataOperand(LLVMModuleRef M, const char* name,
|
||||
void LLVMAddNamedMetadataOperand(LLVMModuleRef M, const char *Name,
|
||||
LLVMValueRef Val);
|
||||
|
||||
/**
|
||||
|
@ -825,16 +825,14 @@ const char *LLVMGetMDString(LLVMValueRef V, unsigned *Length) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
unsigned LLVMGetMDNodeNumOperands(LLVMValueRef V)
|
||||
{
|
||||
unsigned LLVMGetMDNodeNumOperands(LLVMValueRef V) {
|
||||
auto *MD = cast<MetadataAsValue>(unwrap(V));
|
||||
if (isa<ValueAsMetadata>(MD->getMetadata()))
|
||||
return 1;
|
||||
return cast<MDNode>(MD->getMetadata())->getNumOperands();
|
||||
}
|
||||
|
||||
void LLVMGetMDNodeOperands(LLVMValueRef V, LLVMValueRef *Dest)
|
||||
{
|
||||
void LLVMGetMDNodeOperands(LLVMValueRef V, LLVMValueRef *Dest) {
|
||||
auto *MD = cast<MetadataAsValue>(unwrap(V));
|
||||
if (auto *MDV = dyn_cast<ValueAsMetadata>(MD->getMetadata())) {
|
||||
*Dest = wrap(MDV->getValue());
|
||||
@ -847,17 +845,16 @@ void LLVMGetMDNodeOperands(LLVMValueRef V, LLVMValueRef *Dest)
|
||||
Dest[i] = getMDNodeOperandImpl(Context, N, i);
|
||||
}
|
||||
|
||||
unsigned LLVMGetNamedMetadataNumOperands(LLVMModuleRef M, const char* name)
|
||||
{
|
||||
if (NamedMDNode *N = unwrap(M)->getNamedMetadata(name)) {
|
||||
unsigned LLVMGetNamedMetadataNumOperands(LLVMModuleRef M, const char *Name) {
|
||||
if (NamedMDNode *N = unwrap(M)->getNamedMetadata(Name)) {
|
||||
return N->getNumOperands();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void LLVMGetNamedMetadataOperands(LLVMModuleRef M, const char* name, LLVMValueRef *Dest)
|
||||
{
|
||||
NamedMDNode *N = unwrap(M)->getNamedMetadata(name);
|
||||
void LLVMGetNamedMetadataOperands(LLVMModuleRef M, const char *Name,
|
||||
LLVMValueRef *Dest) {
|
||||
NamedMDNode *N = unwrap(M)->getNamedMetadata(Name);
|
||||
if (!N)
|
||||
return;
|
||||
LLVMContext &Context = unwrap(M)->getContext();
|
||||
@ -865,10 +862,9 @@ void LLVMGetNamedMetadataOperands(LLVMModuleRef M, const char* name, LLVMValueRe
|
||||
Dest[i] = wrap(MetadataAsValue::get(Context, N->getOperand(i)));
|
||||
}
|
||||
|
||||
void LLVMAddNamedMetadataOperand(LLVMModuleRef M, const char* name,
|
||||
LLVMValueRef Val)
|
||||
{
|
||||
NamedMDNode *N = unwrap(M)->getOrInsertNamedMetadata(name);
|
||||
void LLVMAddNamedMetadataOperand(LLVMModuleRef M, const char *Name,
|
||||
LLVMValueRef Val) {
|
||||
NamedMDNode *N = unwrap(M)->getOrInsertNamedMetadata(Name);
|
||||
if (!N)
|
||||
return;
|
||||
if (!Val)
|
||||
|
Loading…
Reference in New Issue
Block a user