summaryrefslogtreecommitdiffstats
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
commit8a0e0841f3f35df044da80e7b80e88cd31cdd236 (patch)
tree79eab22532861d275daedfef7cf9f358357c5121
parente684a6d4aa09502b2865f82511abaea71158b488 (diff)
downloadbcm5719-llvm-8a0e0841f3f35df044da80e7b80e88cd31cdd236.tar.gz
bcm5719-llvm-8a0e0841f3f35df044da80e7b80e88cd31cdd236.zip
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. llvm-svn: 176301
-rw-r--r--llvm/lib/IR/AttributeImpl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/AttributeImpl.h b/llvm/lib/IR/AttributeImpl.h
index cb2c55ccbe7..ad2670dade1 100644
--- a/llvm/lib/IR/AttributeImpl.h
+++ b/llvm/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!
OpenPOWER on IntegriCloud