[llvm] r228200 - IR: Define MDNode uniquing sets automatically, NFC

David Blaikie dblaikie at gmail.com
Wed Feb 4 14:02:35 PST 2015


On Wed, Feb 4, 2015 at 1:46 PM, Duncan P. N. Exon Smith <
dexonsmith at apple.com> wrote:

> Author: dexonsmith
> Date: Wed Feb  4 15:46:12 2015
> New Revision: 228200
>
> URL: http://llvm.org/viewvc/llvm-project?rev=228200&view=rev
> Log:
> IR: Define MDNode uniquing sets automatically, NFC
>
> Modified:
>     llvm/trunk/lib/IR/LLVMContextImpl.h
>
> Modified: llvm/trunk/lib/IR/LLVMContextImpl.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/LLVMContextImpl.h?rev=228200&r1=228199&r2=228200&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/IR/LLVMContextImpl.h (original)
> +++ llvm/trunk/lib/IR/LLVMContextImpl.h Wed Feb  4 15:46:12 2015
> @@ -357,9 +357,8 @@ public:
>    DenseMap<Value *, ValueAsMetadata *> ValuesAsMetadata;
>    DenseMap<Metadata *, MetadataAsValue *> MetadataAsValues;
>
> -  DenseSet<MDTuple *, MDTupleInfo> MDTuples;
> -  DenseSet<MDLocation *, MDLocationInfo> MDLocations;
> -  DenseSet<GenericDebugNode *, GenericDebugNodeInfo> GenericDebugNodes;
> +#define HANDLE_MDNODE_LEAF(CLASS) DenseSet<CLASS *, CLASS##Info> CLASS##s;
>

I /think/ (but could well be wrong) that the usual style for def file
inclusions is to undef the relevant macro immediately after the inclusion,
so it doesn't leak into other things, etc.


> +#include "llvm/IR/Metadata.def"
>
>    // MDNodes may be uniqued or not uniqued.  When they're not uniqued,
> they
>    // aren't in the MDNodeSet, but they're still shared between objects,
> so no
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150204/71a57680/attachment.html>


More information about the llvm-commits mailing list