summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Verifier.cpp
diff options
context:
space:
mode:
authorPete Cooper <peter_cooper@apple.com>2015-05-06 23:19:56 +0000
committerPete Cooper <peter_cooper@apple.com>2015-05-06 23:19:56 +0000
commit2777d8874541335b96c7f23ec2e33e6491e6d170 (patch)
treed444a60fb5f17be61d66d034543b0eb909b591df /llvm/lib/IR/Verifier.cpp
parenta842c3fc57d153cf2c002cecad9ca5f912d03a6d (diff)
downloadbcm5719-llvm-2777d8874541335b96c7f23ec2e33e6491e6d170.tar.gz
bcm5719-llvm-2777d8874541335b96c7f23ec2e33e6491e6d170.zip
Change typeIncompatible to return an AttrBuilder instead of new-ing an AttributeSet.
This makes use of the new API which can remove attributes from a set given a builder. This is much faster than creating a temporary set and reduces llc time by about 0.3% which was all spent creating temporary attributes sets on the context. llvm-svn: 236668
Diffstat (limited to 'llvm/lib/IR/Verifier.cpp')
-rw-r--r--llvm/lib/IR/Verifier.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index 16f343aee56..1a30d5b5448 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -1350,9 +1350,10 @@ void Verifier::VerifyParameterAttrs(AttributeSet Attrs, unsigned Idx, Type *Ty,
V);
Assert(!AttrBuilder(Attrs, Idx)
- .hasAttributes(AttributeFuncs::typeIncompatible(Ty, Idx), Idx),
+ .overlaps(AttributeFuncs::typeIncompatible(Ty)),
"Wrong types for attribute: " +
- AttributeFuncs::typeIncompatible(Ty, Idx).getAsString(Idx),
+ AttributeSet::get(*Context, Idx,
+ AttributeFuncs::typeIncompatible(Ty)).getAsString(Idx),
V);
if (PointerType *PTy = dyn_cast<PointerType>(Ty)) {
OpenPOWER on IntegriCloud