[PATCH] D21843: [Driver][OpenMP] Create tool chains for OpenMP offloading kind.

Samuel Antao via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 1 11:31:40 PDT 2016


sfantao added a comment.

Hi Alexey,

Thanks for the review!


================
Comment at: lib/Driver/Driver.cpp:464-468
@@ +463,7 @@
+          RuntimeName = A->getValue();
+        HasCompatibleOpenMP = llvm::StringSwitch<bool>(RuntimeName)
+                                  .Case("libomp", true)
+                                  .Case("libgomp", false)
+                                  .Case("libiomp5", true)
+                                  .Default(false);
+      }
----------------
ABataev wrote:
> I don't like the fact that we have similar string comparisons in different files. This must be handled in a single place.
Ok, that makes sense. I moved the ownership of `OpenMPRuntimeKind` to the `Driver`, given that the Driver was being retrieved in `Tools.cpp` in order to emit the diagnostics.


http://reviews.llvm.org/D21843





More information about the cfe-commits mailing list