[lld] r281951 - Remove a use of std::list.
Rafael EspĂndola via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 20 06:38:19 PDT 2016
Thanks!
On 19 September 2016 at 20:02, Rui Ueyama via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> Author: ruiu
> Date: Mon Sep 19 19:02:06 2016
> New Revision: 281951
>
> URL: http://llvm.org/viewvc/llvm-project?rev=281951&view=rev
> Log:
> Remove a use of std::list.
>
> Modified:
> lld/trunk/ELF/LinkerScript.h
>
> Modified: lld/trunk/ELF/LinkerScript.h
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/
> LinkerScript.h?rev=281951&r1=281950&r2=281951&view=diff
> ============================================================
> ==================
> --- lld/trunk/ELF/LinkerScript.h (original)
> +++ lld/trunk/ELF/LinkerScript.h Mon Sep 19 19:02:06 2016
> @@ -21,7 +21,6 @@
> #include "llvm/Support/MemoryBuffer.h"
> #include "llvm/Support/Regex.h"
> #include <functional>
> -#include <list>
>
> namespace lld {
> namespace elf {
> @@ -101,6 +100,15 @@ struct OutputSectionCommand : BaseComman
> // This struct represents one section match pattern in SECTIONS() command.
> // It can optionally have negative match pattern for EXCLUDED_FILE
> command.
> struct SectionPattern {
> + SectionPattern(llvm::Regex &&Re1, llvm::Regex &&Re2)
> + : ExcludedFileRe(std::forward<llvm::Regex>(Re1)),
> + SectionRe(std::forward<llvm::Regex>(Re2)) {}
> +
> + SectionPattern(SectionPattern &&Other) {
> + std::swap(ExcludedFileRe, Other.ExcludedFileRe);
> + std::swap(SectionRe, Other.SectionRe);
> + }
> +
> llvm::Regex ExcludedFileRe;
> llvm::Regex SectionRe;
> };
> @@ -116,9 +124,7 @@ struct InputSectionDescription : BaseCom
>
> // Input sections that matches at least one of SectionPatterns
> // will be associated with this InputSectionDescription.
> - // We use std::list instead of std::vector because SectionPattern
> - // do not support move assignment.
> - std::list<SectionPattern> SectionPatterns;
> + std::vector<SectionPattern> SectionPatterns;
>
> std::vector<InputSectionData *> Sections;
> };
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160920/6c212665/attachment.html>
More information about the llvm-commits
mailing list