diff options
author | Dale Johannesen <dalej@apple.com> | 2009-02-05 01:49:45 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2009-02-05 01:49:45 +0000 |
commit | 49de98214b82fefeb8f16efbf8cdd8813a85469b (patch) | |
tree | 59d9fe3c8fd629dad52bd0a6a9760c95cf9dbbe3 /lib/VMCore/Function.cpp | |
parent | 2fabcb27761e0f07368f065fda0144d824e1e51c (diff) |
Reapply 63765. Patches for clang and llvm-gcc to follow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63812 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Function.cpp')
-rw-r--r-- | lib/VMCore/Function.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/VMCore/Function.cpp b/lib/VMCore/Function.cpp index bda2eff4c9..bc3b611820 100644 --- a/lib/VMCore/Function.cpp +++ b/lib/VMCore/Function.cpp @@ -175,7 +175,7 @@ Function::Function(const FunctionType *Ty, LinkageTypes Linkage, ParentModule->getFunctionList().push_back(this); // Ensure intrinsics have the right parameter attributes. - if (unsigned IID = getIntrinsicID(true)) + if (unsigned IID = getIntrinsicID()) setAttributes(Intrinsic::getAttributes(Intrinsic::ID(IID))); } @@ -304,7 +304,7 @@ void Function::copyAttributesFrom(const GlobalValue *Src) { /// particular intrinsic functions which correspond to this value are defined in /// llvm/Intrinsics.h. /// -unsigned Function::getIntrinsicID(bool noAssert) const { +unsigned Function::getIntrinsicID() const { const ValueName *ValName = this->getValueName(); if (!ValName) return 0; @@ -315,12 +315,9 @@ unsigned Function::getIntrinsicID(bool noAssert) const { || Name[2] != 'v' || Name[3] != 'm') return 0; // All intrinsics start with 'llvm.' - assert((Len != 5 || noAssert) && "'llvm.' is an invalid intrinsic name!"); - #define GET_FUNCTION_RECOGNIZER #include "llvm/Intrinsics.gen" #undef GET_FUNCTION_RECOGNIZER - assert(noAssert && "Invalid LLVM intrinsic name"); return 0; } @@ -373,4 +370,9 @@ Function *Intrinsic::getDeclaration(Module *M, ID id, const Type **Tys, getType(id, Tys, numTys))); } +// This defines the "Intrinsic::getIntrinsicForGCCBuiltin()" method. +#define GET_LLVM_INTRINSIC_FOR_GCC_BUILTIN +#include "llvm/Intrinsics.gen" +#undef GET_LLVM_INTRINSIC_FOR_GCC_BUILTIN + // vim: sw=2 ai |