[llvm] r270452 - Extract renaming from D19181
Amaury Sechet via llvm-commits
llvm-commits at lists.llvm.org
Mon May 23 09:38:27 PDT 2016
Author: deadalnix
Date: Mon May 23 11:38:25 2016
New Revision: 270452
URL: http://llvm.org/viewvc/llvm-project?rev=270452&view=rev
Log:
Extract renaming from D19181
Summary: This needs to get in before anything is released concerning attribute. If the old name gets in the wild, then we are stuck with it forever. Putting it in its own diff should getting that part at least in fast.
Reviewers: Wallbraker, whitequark, joker.eph, echristo, rafael, jyknight
Subscribers: llvm-commits, joker.eph
Differential Revision: http://reviews.llvm.org/D20417
Modified:
llvm/trunk/docs/ReleaseNotes.rst
llvm/trunk/include/llvm-c/Core.h
llvm/trunk/lib/IR/Core.cpp
Modified: llvm/trunk/docs/ReleaseNotes.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.rst?rev=270452&r1=270451&r2=270452&view=diff
==============================================================================
--- llvm/trunk/docs/ReleaseNotes.rst (original)
+++ llvm/trunk/docs/ReleaseNotes.rst Mon May 23 11:38:25 2016
@@ -55,7 +55,7 @@ Non-comprehensive list of changes in thi
in favor of LLVMGetDataLayoutStr.
* The C API enum LLVMAttribute is deprecated in favor of
- LLVMGetAttrKindID.
+ LLVMGetAttributeKindForName.
* ``TargetFrameLowering::eliminateCallFramePseudoInstr`` now returns an
iterator to the next instruction instead of ``void``. Targets that previously
Modified: llvm/trunk/include/llvm-c/Core.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Core.h?rev=270452&r1=270451&r2=270452&view=diff
==============================================================================
--- llvm/trunk/include/llvm-c/Core.h (original)
+++ llvm/trunk/include/llvm-c/Core.h Mon May 23 11:38:25 2016
@@ -487,7 +487,7 @@ unsigned LLVMGetMDKindID(const char *Nam
* NB: Attribute names and/or id are subject to change without
* going through the C API deprecation cycle.
*/
-unsigned LLVMGetAttrKindID(const char *Name, size_t SLen);
+unsigned LLVMGetAttributeKindForName(const char *Name, size_t SLen);
/**
* @}
Modified: llvm/trunk/lib/IR/Core.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Core.cpp?rev=270452&r1=270451&r2=270452&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Core.cpp (original)
+++ llvm/trunk/lib/IR/Core.cpp Mon May 23 11:38:25 2016
@@ -124,13 +124,8 @@ unsigned LLVMGetMDKindID(const char *Nam
#define GET_ATTR_KIND_FROM_NAME
#include "AttributesCompatFunc.inc"
-unsigned LLVMGetAttrKindID(const char *Name, size_t SLen) {
- auto K = getAttrKindFromName(StringRef(Name, SLen));
- if (K == Attribute::None) {
- return 0;
- }
-
- return AttributeImpl::getAttrMask(K);
+unsigned LLVMGetAttributeKindForName(const char *Name, size_t SLen) {
+ return getAttrKindFromName(StringRef(Name, SLen));
}
char *LLVMGetDiagInfoDescription(LLVMDiagnosticInfoRef DI) {
More information about the llvm-commits
mailing list