From 1e090f0b8f2367e577c495ba7691b43e5df1b0be Mon Sep 17 00:00:00 2001 From: "Michael J. Spencer" Date: Tue, 7 Dec 2010 03:57:37 +0000 Subject: Support/PathV2: Remove the error_code return type from all functions in the path namespace. None of them return anything except for success anyway. These will be converted to returning their result soon. llvm-svn: 121109 --- llvm/lib/Support/Unix/PathV2.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/lib/Support/Unix/PathV2.inc') diff --git a/llvm/lib/Support/Unix/PathV2.inc b/llvm/lib/Support/Unix/PathV2.inc index fc6b3867d57..3e75e9e1127 100644 --- a/llvm/lib/Support/Unix/PathV2.inc +++ b/llvm/lib/Support/Unix/PathV2.inc @@ -325,11 +325,11 @@ error_code unique_file(const Twine &model, int &result_fd, // Make model absolute by prepending a temp directory if it's not already. bool absolute; - if (error_code ec = path::is_absolute(Twine(Model), absolute)) return ec; + path::is_absolute(Twine(Model), absolute); if (!absolute) { SmallString<128> TDir; if (error_code ec = TempDir(TDir)) return ec; - if (error_code ec = path::append(TDir, Twine(Model))) return ec; + path::append(TDir, Twine(Model)); Model.swap(TDir); } @@ -374,7 +374,7 @@ rety_open_create: SmallString<64> dir_to_create; for (path::const_iterator i = path::begin(p), e = --path::end(p); i != e; ++i) { - if (error_code ec = path::append(dir_to_create, *i)) return ec; + path::append(dir_to_create, *i); bool Exists; if (error_code ec = exists(Twine(dir_to_create), Exists)) return ec; if (!Exists) { -- cgit v1.2.3