diff options
Diffstat (limited to 'llvm/tools/llvm-ifs/llvm-ifs.cpp')
-rw-r--r-- | llvm/tools/llvm-ifs/llvm-ifs.cpp | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/llvm/tools/llvm-ifs/llvm-ifs.cpp b/llvm/tools/llvm-ifs/llvm-ifs.cpp index f9b6a8c..6909bd1 100644 --- a/llvm/tools/llvm-ifs/llvm-ifs.cpp +++ b/llvm/tools/llvm-ifs/llvm-ifs.cpp @@ -533,34 +533,33 @@ int main(int argc, char *argv[]) { << "Triple should be defined when output format is TBD"; return -1; } - return writeTbdStub(llvm::Triple(Stub.Target.Triple.getValue()), + return writeTbdStub(llvm::Triple(Stub.Target.Triple.value()), Stub.Symbols, "TBD", Out); } case FileFormat::IFS: { Stub.IfsVersion = IfsVersionCurrent; - if (Config.InputFormat.getValue() == FileFormat::ELF && + if (Config.InputFormat.value() == FileFormat::ELF && Config.HintIfsTarget) { std::error_code HintEC(1, std::generic_category()); IFSTarget HintTarget = parseTriple(*Config.HintIfsTarget); - if (Stub.Target.Arch.getValue() != HintTarget.Arch.getValue()) + if (Stub.Target.Arch.value() != HintTarget.Arch.value()) fatalError(make_error<StringError>( "Triple hint does not match the actual architecture", HintEC)); - if (Stub.Target.Endianness.getValue() != - HintTarget.Endianness.getValue()) + if (Stub.Target.Endianness.value() != HintTarget.Endianness.value()) fatalError(make_error<StringError>( "Triple hint does not match the actual endianness", HintEC)); - if (Stub.Target.BitWidth.getValue() != HintTarget.BitWidth.getValue()) + if (Stub.Target.BitWidth.value() != HintTarget.BitWidth.value()) fatalError(make_error<StringError>( "Triple hint does not match the actual bit width", HintEC)); stripIFSTarget(Stub, true, false, false, false); - Stub.Target.Triple = Config.HintIfsTarget.getValue(); + Stub.Target.Triple = Config.HintIfsTarget.value(); } else { stripIFSTarget(Stub, Config.StripIfsTarget, Config.StripIfsArch, Config.StripIfsEndianness, Config.StripIfsBitwidth); } Error IFSWriteError = - writeIFS(Config.Output.getValue(), Stub, Config.WriteIfChanged); + writeIFS(Config.Output.value(), Stub, Config.WriteIfChanged); if (IFSWriteError) fatalError(std::move(IFSWriteError)); break; @@ -589,29 +588,28 @@ int main(int argc, char *argv[]) { } if (Config.OutputIfs) { Stub.IfsVersion = IfsVersionCurrent; - if (Config.InputFormat.getValue() == FileFormat::ELF && + if (Config.InputFormat.value() == FileFormat::ELF && Config.HintIfsTarget) { std::error_code HintEC(1, std::generic_category()); IFSTarget HintTarget = parseTriple(*Config.HintIfsTarget); - if (Stub.Target.Arch.getValue() != HintTarget.Arch.getValue()) + if (Stub.Target.Arch.value() != HintTarget.Arch.value()) fatalError(make_error<StringError>( "Triple hint does not match the actual architecture", HintEC)); - if (Stub.Target.Endianness.getValue() != - HintTarget.Endianness.getValue()) + if (Stub.Target.Endianness.value() != HintTarget.Endianness.value()) fatalError(make_error<StringError>( "Triple hint does not match the actual endianness", HintEC)); - if (Stub.Target.BitWidth.getValue() != HintTarget.BitWidth.getValue()) + if (Stub.Target.BitWidth.value() != HintTarget.BitWidth.value()) fatalError(make_error<StringError>( "Triple hint does not match the actual bit width", HintEC)); stripIFSTarget(Stub, true, false, false, false); - Stub.Target.Triple = Config.HintIfsTarget.getValue(); + Stub.Target.Triple = Config.HintIfsTarget.value(); } else { stripIFSTarget(Stub, Config.StripIfsTarget, Config.StripIfsArch, Config.StripIfsEndianness, Config.StripIfsBitwidth); } Error IFSWriteError = - writeIFS(Config.OutputIfs.getValue(), Stub, Config.WriteIfChanged); + writeIFS(Config.OutputIfs.value(), Stub, Config.WriteIfChanged); if (IFSWriteError) fatalError(std::move(IFSWriteError)); } @@ -628,8 +626,8 @@ int main(int argc, char *argv[]) { << "Triple should be defined when output format is TBD"; return -1; } - return writeTbdStub(llvm::Triple(Stub.Target.Triple.getValue()), - Stub.Symbols, "TBD", Out); + return writeTbdStub(llvm::Triple(*Stub.Target.Triple), Stub.Symbols, + "TBD", Out); } } return 0; |