summaryrefslogtreecommitdiff
path: root/lib/IR/AttributeImpl.h
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-02-28 21:17:03 +0000
committerBill Wendling <isanbard@gmail.com>2013-02-28 21:17:03 +0000
commit40c81fe501ac99ff3f3ec004ce9e5a526d07e441 (patch)
tree1c7f35a88f1369569489e7726c27cbfa32ee73af /lib/IR/AttributeImpl.h
parentc5a4c25b8780434a00968ed93634974a0b796a06 (diff)
downloadllvm-40c81fe501ac99ff3f3ec004ce9e5a526d07e441.tar.gz
llvm-40c81fe501ac99ff3f3ec004ce9e5a526d07e441.tar.bz2
llvm-40c81fe501ac99ff3f3ec004ce9e5a526d07e441.tar.xz
Don't add the 'Value' string if there isn't one.
This was causing the folding set to fail to fold attributes, because it was being calculated in one spot without an empty values string but here with an empty values string. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176301 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/AttributeImpl.h')
-rw-r--r--lib/IR/AttributeImpl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/IR/AttributeImpl.h b/lib/IR/AttributeImpl.h
index cb2c55ccbe..ad2670dade 100644
--- a/lib/IR/AttributeImpl.h
+++ b/lib/IR/AttributeImpl.h
@@ -146,7 +146,7 @@ public:
}
static void Profile(FoldingSetNodeID &ID, StringRef Kind, StringRef Values) {
ID.AddString(Kind);
- ID.AddString(Values);
+ if (!Values.empty()) ID.AddString(Values);
}
// FIXME: Remove this!