ABataev added inline comments.
================
Comment at: clang/lib/CodeGen/CGDecl.cpp:589
+        : AddrSizePair(AddrSizePair) {}
+    void Emit(CodeGenFunction &CGF, Flags Flags) override {
+      CGOpenMPRuntimeGPU &RT =
----------------
Name of the variable hides the type, potential warning or even error


================
Comment at: clang/lib/CodeGen/CGDecl.cpp:1605-1609
+        (CGM.getContext().getTargetInfo().getTriple().isAMDGPU() ||
+         CGM.getContext().getTargetInfo().getTriple().isNVPTX())) {
+      CGOpenMPRuntimeGPU &RT =
+          *(static_cast<CGOpenMPRuntimeGPU *>(&CGM.getOpenMPRuntime()));
+      if (RT.isDelayedVariableLengthDecl(*this, &D)) {
----------------
I think you can drop triple checks and rely completely on 
RT.isDelayedVariableLengthDecl(*this, &D) result here


================
Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:2164-2174
+bool CodeGenFunction::hasVLASize(const VariableArrayType *type) {
+  QualType elementType;
+  do {
+    elementType = type->getElementType();
+    llvm::Value *vlaSize = VLASizeMap[type->getSizeExpr()];
+    if (!vlaSize)
+      return false;
----------------
Fix var naming


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153883/new/

https://reviews.llvm.org/D153883

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to