diff options
| author | Arthur LAURENT <[email protected]> | 2022-08-05 03:30:52 +0200 |
|---|---|---|
| committer | Arthur LAURENT <[email protected]> | 2022-08-05 03:30:52 +0200 |
| commit | 886364620b81ad0024e5e98bee9b5a44e6c6f160 (patch) | |
| tree | 7a7c579cfb0c598603406510b673b5950be45278 /xmake/rules/c++/modules/modules_support/clang.lua | |
| parent | bd2fc3f699e468604bdf489c3348d22962f14012 (diff) | |
Remove useless isdir checks
Diffstat (limited to 'xmake/rules/c++/modules/modules_support/clang.lua')
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/clang.lua | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/xmake/rules/c++/modules/modules_support/clang.lua b/xmake/rules/c++/modules/modules_support/clang.lua index 4ab3c3892..cc6e2f927 100644 --- a/xmake/rules/c++/modules/modules_support/clang.lua +++ b/xmake/rules/c++/modules/modules_support/clang.lua @@ -184,15 +184,11 @@ function generate_user_headerunits(target, batchcmds, headerunits, opt) else outdir = path.join(cachedir, path.directory(headerunit.path)) end - if not os.isdir(outdir) then - batchcmds:mkdir(outdir) - end + batchcmds:mkdir(outdir) local bmifilename = path.basename(objectfile) .. get_bmi_extension() local bmifile = (outdir and path.join(outdir, bmifilename) or bmifilename) - if not os.isdir(path.directory(objectfile)) then - batchcmds:mkdir(path.directory(objectfile)) - end + batchcmds:mkdir(path.directory(objectfile)) local args = { modulecachepathflag .. cachedir, emitmoduleflag, "-c", "-o", bmifile} if headerunit.type == ":quote" then @@ -237,9 +233,7 @@ function build_modules(target, batchcmds, objectfiles, modules, opt) for _, objectfile in ipairs(objectfiles) do local m = modules[objectfile] if m then - if not os.isdir(path.directory(objectfile)) then - batchcmds:mkdir(path.directory(objectfile)) - end + batchcmds:mkdir(path.directory(objectfile)) local args = { emitmoduleinterfaceflag } local bmiflags = {} |
