From 48865ca64d823eb5a76514deeffe235b54c86da7 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Thu, 26 Mar 2015 01:29:06 +0000 Subject: Make PowerOf2's constructor private. Ban conversion from integers to PowerOf2 even if explicit to make all places we create PowerOf2 instances visible. llvm-svn: 233243 --- lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp') diff --git a/lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp b/lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp index 3635c62aa7c..79eefd32573 100644 --- a/lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp +++ b/lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp @@ -61,7 +61,7 @@ struct ScalarTraits { static StringRef input(StringRef scalar, void*, lld::PowerOf2 &result) { uint32_t value; scalar.getAsInteger(10, value); - result = lld::PowerOf2(value); + result = lld::PowerOf2::create(value); return StringRef(); } static bool mustQuote(StringRef) { return false; } @@ -290,7 +290,7 @@ struct MappingTraits
{ io.mapRequired("section", sect.sectionName); io.mapRequired("type", sect.type); io.mapOptional("attributes", sect.attributes); - io.mapOptional("alignment", sect.alignment, lld::PowerOf2(0)); + io.mapOptional("alignment", sect.alignment, lld::PowerOf2::create(0)); io.mapRequired("address", sect.address); if (sect.type == llvm::MachO::S_ZEROFILL) { // S_ZEROFILL sections use "size:" instead of "content:" -- cgit v1.2.3