[clang] [OpenACC][CIR] Implement 'device_type' clause lowering for 'init'/'sh… (PR #135102)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 10 10:09:10 PDT 2025
================
@@ -57,31 +75,90 @@ class OpenACCClauseCIREmitter final
}
}
+ mlir::acc::DeviceType decodeDeviceType(const IdentifierInfo *II) {
+
+ // '*' case leaves no identifier-info, just a nullptr.
+ if (!II)
+ return mlir::acc::DeviceType::Star;
+ return llvm::StringSwitch<mlir::acc::DeviceType>(II->getName())
----------------
andykaylor wrote:
What does this return if none of the strings is matched?
https://github.com/llvm/llvm-project/pull/135102
More information about the cfe-commits
mailing list