summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2015-03-26 01:29:06 +0000
committerRui Ueyama <ruiu@google.com>2015-03-26 01:29:06 +0000
commit48865ca64d823eb5a76514deeffe235b54c86da7 (patch)
tree7da27a597476f8ed56f8d9e6ccbb472b79a148a0 /lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp
parentc3d18f512054d8268d1e1a2e5935167cd3db6480 (diff)
downloadbcm5719-llvm-48865ca64d823eb5a76514deeffe235b54c86da7.tar.gz
bcm5719-llvm-48865ca64d823eb5a76514deeffe235b54c86da7.zip
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
Diffstat (limited to 'lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp')
-rw-r--r--lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp4
1 files changed, 2 insertions, 2 deletions
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<lld::PowerOf2> {
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<Section> {
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:"
OpenPOWER on IntegriCloud