[clang] [NFC][clang][Driver] Changed if-else to a StringSwitch in CreateFileHandler (PR #238231)
Aditya Sinha via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 3 00:25:56 PST 2026
AdityaSinha149 wrote:
> Is the enum abstraction more readable?
>
> One alternative thing we could do is collapse the if statements with the same return into one statement, example:
>
> ```
> if (FilesType == "i" || FilesType == "ii" ||
> FilesType == "cui" || FilesType == "hipi")
> return std::make_unique<TextFileHandler>("//");
> ```
makes sense, did the change. Please rereview.
https://github.com/llvm/llvm-project/pull/238231
More information about the cfe-commits
mailing list