[PATCH] D64592: [OpenMP] Fix declare target link implementation

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 18 12:36:22 PDT 2019


ABataev added inline comments.


================
Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:2594-2597
+      if (!VD->isExternallyVisible())
+        getTargetEntryUniqueInfo(CGM.getContext(),
+                                 VD->getCanonicalDecl()->getBeginLoc(),
+                                 DeviceID, FileID, Line);
----------------
Merge these 2 checks into one, please.
```
OS << CGM.getMangledName(GlobalDecl(VD));
if (!VD->isExternallyVisible()) {
      unsigned DeviceID, Line;
      unsigned FileID = 0;
        getTargetEntryUniqueInfo(CGM.getContext(),
                                 VD->getCanonicalDecl()->getBeginLoc(),
                                 DeviceID, FileID, Line);
       OS << llvm::format("_%x", FileID);
}
OS << "_decl_tgt_ref_ptr";
```


Repository:
  rC Clang

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

https://reviews.llvm.org/D64592





More information about the cfe-commits mailing list