[llvm] r265277 - Various style fix in Core.h/Core.cpp . NFC
Amaury Sechet via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 3 14:06:04 PDT 2016
Author: deadalnix
Date: Sun Apr 3 16:06:04 2016
New Revision: 265277
URL: http://llvm.org/viewvc/llvm-project?rev=265277&view=rev
Log:
Various style fix in Core.h/Core.cpp . NFC
Modified:
llvm/trunk/include/llvm-c/Core.h
llvm/trunk/lib/IR/Core.cpp
Modified: llvm/trunk/include/llvm-c/Core.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Core.h?rev=265277&r1=265276&r2=265277&view=diff
==============================================================================
--- llvm/trunk/include/llvm-c/Core.h (original)
+++ llvm/trunk/include/llvm-c/Core.h Sun Apr 3 16:06:04 2016
@@ -1527,7 +1527,7 @@ LLVMBool LLVMIsConstantString(LLVMValueR
*
* @see ConstantDataSequential::getAsString()
*/
-const char *LLVMGetAsString(LLVMValueRef c, size_t* out);
+const char *LLVMGetAsString(LLVMValueRef c, size_t *Length);
/**
* Create an anonymous ConstantStruct with the specified values.
@@ -2060,7 +2060,7 @@ LLVMValueRef LLVMMDNode(LLVMValueRef *Va
* @param Len Memory address which will hold length of returned string.
* @return String data in MDString.
*/
-const char *LLVMGetMDString(LLVMValueRef V, unsigned* Len);
+const char *LLVMGetMDString(LLVMValueRef V, unsigned *Length);
/**
* Obtain the number of operands from an MDNode value.
Modified: llvm/trunk/lib/IR/Core.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Core.cpp?rev=265277&r1=265276&r2=265277&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Core.cpp (original)
+++ llvm/trunk/lib/IR/Core.cpp Sun Apr 3 16:06:04 2016
@@ -769,13 +769,13 @@ LLVMValueRef LLVMMDNode(LLVMValueRef *Va
return LLVMMDNodeInContext(LLVMGetGlobalContext(), Vals, Count);
}
-const char *LLVMGetMDString(LLVMValueRef V, unsigned* Len) {
+const char *LLVMGetMDString(LLVMValueRef V, unsigned *Length) {
if (const auto *MD = dyn_cast<MetadataAsValue>(unwrap(V)))
if (const MDString *S = dyn_cast<MDString>(MD->getMetadata())) {
- *Len = S->getString().size();
+ *Length = S->getString().size();
return S->getString().data();
}
- *Len = 0;
+ *Length = 0;
return nullptr;
}
@@ -925,10 +925,10 @@ LLVMBool LLVMIsConstantString(LLVMValueR
return unwrap<ConstantDataSequential>(C)->isString();
}
-const char *LLVMGetAsString(LLVMValueRef C, size_t* Length) {
- StringRef str = unwrap<ConstantDataSequential>(C)->getAsString();
- *Length = str.size();
- return str.data();
+const char *LLVMGetAsString(LLVMValueRef C, size_t *Length) {
+ StringRef Str = unwrap<ConstantDataSequential>(C)->getAsString();
+ *Length = Str.size();
+ return Str.data();
}
LLVMValueRef LLVMConstArray(LLVMTypeRef ElementTy,
More information about the llvm-commits
mailing list