[llvm] r176301 - Don't add the 'Value' string if there isn't one.
Bill Wendling
isanbard at gmail.com
Thu Feb 28 13:17:03 PST 2013
Author: void
Date: Thu Feb 28 15:17:03 2013
New Revision: 176301
URL: http://llvm.org/viewvc/llvm-project?rev=176301&view=rev
Log:
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.
Modified:
llvm/trunk/lib/IR/AttributeImpl.h
Modified: llvm/trunk/lib/IR/AttributeImpl.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/AttributeImpl.h?rev=176301&r1=176300&r2=176301&view=diff
==============================================================================
--- llvm/trunk/lib/IR/AttributeImpl.h (original)
+++ llvm/trunk/lib/IR/AttributeImpl.h Thu Feb 28 15:17:03 2013
@@ -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!
More information about the llvm-commits
mailing list