[llvm-commits] [llvm] r93338 - in /llvm/trunk/lib/Bitcode/Writer: ValueEnumerator.cpp ValueEnumerator.h
Devang Patel
devang.patel at gmail.com
Wed Jan 13 13:00:16 PST 2010
On Wed, Jan 13, 2010 at 11:36 AM, Victor Hernandez <vhernandez at apple.com> wrote:
> -void ValueEnumerator::EnumerateMetadata(const MetadataBase *MD) {
> +void ValueEnumerator::EnumerateMetadata(const MetadataBase *MD, bool isGlobal) {
> // Check to see if it's already in!
> unsigned &MDValueID = MDValueMap[MD];
> if (MDValueID) {
> @@ -237,14 +237,18 @@
> EnumerateType(MD->getType());
>
> if (const MDNode *N = dyn_cast<MDNode>(MD)) {
> - MDValues.push_back(std::make_pair(MD, 1U));
> - MDValueMap[MD] = MDValues.size();
> - MDValueID = MDValues.size();
> - for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) {
> - if (Value *V = N->getOperand(i))
> - EnumerateValue(V);
> - else
> - EnumerateType(Type::getVoidTy(MD->getContext()));
> + if ((isGlobal && !N->isFunctionLocal()) ||
> + (!isGlobal && N->isFunctionLocal())) {
What are the cases where isGlobal does not match N->isFunctionLocal() ?
-
Devang
More information about the llvm-commits
mailing list