LLVM API Documentation
00001 //===-- Comdat.cpp - Implement Metadata classes --------------------------===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file implements the Comdat class. 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #include "llvm/IR/Comdat.h" 00015 #include "llvm/ADT/StringMap.h" 00016 using namespace llvm; 00017 00018 Comdat::Comdat(SelectionKind SK, StringMapEntry<Comdat> *Name) 00019 : Name(Name), SK(SK) {} 00020 00021 Comdat::Comdat(Comdat &&C) : Name(C.Name), SK(C.SK) {} 00022 00023 Comdat::Comdat() : Name(nullptr), SK(Comdat::Any) {} 00024 00025 StringRef Comdat::getName() const { return Name->first(); }