[flang-commits] [flang] cc4768f - [flang]Add examples in documentation/BijectiveInternalNameUniquing.md

Sameeran joshi via flang-commits flang-commits at lists.llvm.org
Thu May 7 11:35:42 PDT 2020


Author: sameeran joshi
Date: 2020-05-08T00:01:35+05:30
New Revision: cc4768f2ec7ca1e6421c18afeface61376e9fab7

URL: https://github.com/llvm/llvm-project/commit/cc4768f2ec7ca1e6421c18afeface61376e9fab7
DIFF: https://github.com/llvm/llvm-project/commit/cc4768f2ec7ca1e6421c18afeface61376e9fab7.diff

LOG:     [flang]Add examples in documentation/BijectiveInternalNameUniquing.md

    Summary:
    I thought it would be simpler to understand on how the unique names would
    look like when an example is present. So I added some examples.

    I found 2 such places to add examples
    -Common blocks
    -Module scope global data

    Reviewers: schweitz, kiranchandramohan, sscalpone, jeanPerier, jdoerfert, DavidTruby

    Reviewed By: schweitz, jeanPerier

    Subscribers: llvm-commits, flang-commits

    Tags: #flang, #llvm

    Differential Revision: https://reviews.llvm.org/D79442

Added: 
    

Modified: 
    flang/documentation/BijectiveInternalNameUniquing.md

Removed: 
    


################################################################################
diff  --git a/flang/documentation/BijectiveInternalNameUniquing.md b/flang/documentation/BijectiveInternalNameUniquing.md
index e23264aeb0b5..b302d389c664 100644
--- a/flang/documentation/BijectiveInternalNameUniquing.md
+++ b/flang/documentation/BijectiveInternalNameUniquing.md
@@ -49,11 +49,49 @@ The uniqued name of `fun` becomes:
 
    * A common block name will be prefixed with `B`
 
+Given:
+```
+   common /variables/ i, j
+```
+
+The uniqued name of `variables` becomes:
+```
+    _QBvariables
+```
+
+Given:
+```
+   common i, j
+```
+
+The uniqued name in case of `blank common block` becomes:
+```
+    _QB
+```
+
 ### Module scope global data
 
    * A global data entity is prefixed with `E`
    * A global entity that is constant (parameter) will be prefixed with `EC`
 
+Given:
+```
+    module mod
+      integer :: intvar
+      real, parameter :: pi = 3.14
+    end module
+```
+
+The uniqued name of `intvar` becomes:
+```
+    _QMmodEintvar
+```
+
+The uniqued name of `pi` becomes:
+```
+    _QMmodECpi
+```
+
 ### Procedures/Subprograms
 
    * A procedure/subprogram is prefixed with `P`


        


More information about the flang-commits mailing list